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
This is likely because map is overloaded in various collection types like Map since 2.13, so infering the types of the lambda arguments gets harder, there were quite a few tweaks to inference in 2.13 to make this sort of things work, in particular scala/scala#6871 is probably relevant here.
`pretypeArgs` allows arguments of overloaded methods to be typed with a
more precise expected type when the formal parameter types of each overload
are all compatible function types, but previously this logic only kicked
in for arguments which were syntactically known to be functions
themselves, which means that it worked when the argument was `foo(_)` or
`x => foo(x)`, but not when it was just `foo`. This commit simply
removes this restriction.
Fixesscala#10325.
Using Scala version
3.0.0-M1
Minimized code
Output
Expectation
I'm quite new to Scala 3 but there shouldn't be any need for more explicit types, isn't it?
val m2
should compile without error.Notes
This is actually part of existing code: https://github.com/cucumber/cucumber-jvm-scala/blob/main/cucumber-scala/src/main/scala/io/cucumber/scala/Implicits.scala#L35
The text was updated successfully, but these errors were encountered: