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
@adriaanm said:
Thank you for reporting, and the nice self-contained example!
This is a consequence of scala/scala#5307, which tries harder to infer an expected type for the function literal that's passed as the argument to the overloaded method toMap. Since the first argument of toMap's overloads is a (subtype of) a function type, we infer that the function literal should have type Any => ? (Any is the least upper bound of T and Foo[T] -- remember that <:< is a subclass of Function1). We could add a special case to exclude overloads where argument lists differ in their "implicitness", but I have to think about that a little bit more.
The following codes cannot be compiled with 2.12.0-RC1
The error information is:
It works with 2.12.0-M5, 2.11 and 2.10.
Is it a regression in 2.12.0-RC1?
The text was updated successfully, but these errors were encountered: