Closed
Description
Compiler version
v3.0.0-RC3
Minimized code
@main def main : Unit =
val x = 1
val y = x match
case 1 => 1
case _ =>
println("bad")
???
println(x)
https://scastie.scala-lang.org/ycgXIOkfQL6SJ6nhFOVTUg
Output
postfix operator `???` needs to be enabled
by making the implicit value scala.language.postfixOps visible.
----
This can be achieved by adding the import clause 'import scala.language.postfixOps'
or by setting the compiler option -language:postfixOps.
See the Scaladoc for value scala.language.postfixOps for a discussion
why the feature needs to be explicitly enabled.
Expectation
No error. The compiler seems to be misreading the indentation of the last println
.