Open
Description
Compiler version
3.7.2-RC1-bin-20250507-c85982c-NIGHTLY
Minimized code
Some((name = "Bob")) match {
case Some(name = a) => println(a)
}
Output
Compiles, but running the program gives:
Exception in thread "main" java.lang.ClassCastException: class scala.Tuple1 cannot be cast to class java.lang.String (scala.Tuple1 is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
at org.test.Main$package$.test(Main.scala:17)
at org.test.test.main(Main.scala:7)
Expectation
Should print 6