We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.0, 3.2.2-RC1-bin-20221017-b88aa12-NIGHTLY-git-b88aa12
(1: Any) match case (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_) => ??? case _ => println("not tuple xxl")
java.lang.ClassCastException: java.lang.Integer cannot be cast to scala.runtime.TupleXXL ... 32 elided
no error, output not tuple xxl
not tuple xxl
The text was updated successfully, but these errors were encountered:
looking at further desugaring of the match, we get to the point where we desugar to the if then else form, and see that there is a cast to TupleXXL:
if then else
TupleXXL
matchResult1[Unit]: { case val x1: Any = 1:Any if x1.$asInstanceOf[Object].ne(null) then { case val x2: Option[Seq[Any]] = scala.runtime.TupleXXL.unapplySeq( x1.$asInstanceOf[runtime.TupleXXL] // Why do we cast `Any` to `TupleXXL`? ) if x2.isEmpty.unary_! then { case val x3: Seq[Any] = x2.get if x3.lengthCompare(23).==(0) then { case val x4: Any = x3.apply(0) case val x5: Any = x3.apply(1) case val x6: Any = x3.apply(2) case val x7: Any = x3.apply(3) case val x8: Any = x3.apply(4) case val x9: Any = x3.apply(5) case val x10: Any = x3.apply(6) case val x11: Any = x3.apply(7) case val x12: Any = x3.apply(8) case val x13: Any = x3.apply(9) case val x14: Any = x3.apply(10) case val x15: Any = x3.apply(11) case val x16: Any = x3.apply(12) case val x17: Any = x3.apply(13) case val x18: Any = x3.apply(14) case val x19: Any = x3.apply(15) case val x20: Any = x3.apply(16) case val x21: Any = x3.apply(17) case val x22: Any = x3.apply(18) case val x23: Any = x3.apply(19) case val x24: Any = x3.apply(20) case val x25: Any = x3.apply(21) case val x26: Any = x3.apply(22) return[matchResult1] { ??? } } else () } else () } else () return[matchResult1] { println("not tuple xxl") } }
Sorry, something went wrong.
dwijnand
Successfully merging a pull request may close this issue.
Compiler version
3.2.0, 3.2.2-RC1-bin-20221017-b88aa12-NIGHTLY-git-b88aa12
Minimized code
Output
Expectation
no error, output
not tuple xxl
The text was updated successfully, but these errors were encountered: