-
Notifications
You must be signed in to change notification settings - Fork 21
Type inference failure while picking among conversions #13102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't understand the details yet but
I also don't understand why
Then I'll tweak the title to reflect that it's a problem with type inference and not overload resolution per se. |
for reference, the Map construction is not involved (but produces noisy debug)
|
Reproduction steps
Scala version: 2.13.16
Problem
Map#map
has 2 alternatives:map[K2, V2](f: ((K, V)) => (K2, V2)): Map[K2, V2]
andmap[B](f: ((K, V)) => B): Iterable[B]
. The first one is more specific so I expectMap("key" -> "value").map(identity)
to return aMap
, not anIterable
convertIterable1
withconvertIterable2
The text was updated successfully, but these errors were encountered: