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
Welcome to Scala3.1.1 (11.0.13, JavaOpenJDK64-BitServerVM).
Type in expressions for evaluation. Ortry:help.
scala>defm(i: Int*) = i.sum
defm(i: Int*):Int
scala>valf= m _
-- [E081] TypeError:---------------------------------------------------------------------------------------------------------1|valf= m _
|^|Missing parameter type||I could not infer the typeof the parameter i.
1 error found
But it works if the type is given explicitly:
scala>valf:Seq[Int] =>Int= m
valf:Seq[Int] =>Int=Lambda$1433/0x0000000800768840@434d001d
Expectation
It works in Scala 2 so this is a regression:
Welcome to Scala2.13.8 (OpenJDK64-BitServerVM, Java11.0.13).
Type in expressions for evaluation. Ortry:help.
scala>defm(i: Int*) = i.sum
defm(i: Int*):Int
scala>valf= m _
valf:Seq[Int] =>Int= $Lambda$1132/0x00000001006bf040@4def7d36
The text was updated successfully, but these errors were encountered:
Compiler version
3.1.1
Minimized code and output
But it works if the type is given explicitly:
Expectation
It works in Scala 2 so this is a regression:
The text was updated successfully, but these errors were encountered: