You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry in advance to Seth if this turns out to be a question. He can come after me.
Reproduction steps
Scala version: 2.13.16
Welcome to Scala2.13.16 (OpenJDK64-BitServerVM, Java23.0.2).
Type in expressions for evaluation. Ortry:help.
scala>deff(x: Any) = x match { case3.14:Double=> x }
^error: '=>' expected but ':' found.
scala>deff(x: Any) = x match { case3.14=> x }
deff(x: Any):Any
scala>deff(x: Any) = x match { casex: 3.14=> x }
deff(x: Any):Any
scala>deff(x: Any) = x match { casex: Double=> x }
deff(x: Any):Double
scala>deff(x: Any):Double= x match { casex: 3.14=> x }
^error: typemismatch;
found : Anyrequired: Double
scala>:quit
Problem
Welcome to Scala3.6.4 (23.0.2, JavaOpenJDK64-BitServerVM).
Type in expressions for evaluation. Ortry:help.
scala>deff(x: Any) = x match { case3.14:Double=> x }
deff(x: Any):Any
scala>deff(x: Any) = x match { casex: Double=> x }
deff(x: Any):Double
scala>deff(x: Any) = x match { casex: 3.14=> x }
deff(x: Any):Double
scala>
It accepts the funny syntax and also infers Double for the last case.
Uh oh!
There was an error while loading. Please reload this page.
Questions are not bug reports
Sorry in advance to Seth if this turns out to be a question. He can come after me.
Reproduction steps
Scala version: 2.13.16
Problem
It accepts the funny syntax and also infers
Double
for the last case.Noticed at related scala/scala#11056 (comment)
The text was updated successfully, but these errors were encountered: