-
Notifications
You must be signed in to change notification settings - Fork 21
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
Scala 2.12 -> 2.13 regression in implicit precedence #11596
Comments
I see 2.12 doesn't even look at the monad implicit, so it may have progressed with fixes to "implicit shadowing" (just a guess) or maybe pruning strategy. I'm actually not able to view the spec right now, for some internet reason. That's a reason to finally get a PDF version again. I know someone worked on that recently. (Edit: it loaded after several minutes. Cloudflare?) If both methods are in scope, ordinary static overload resolution applies. IIRC "defined in a subclass" is a tie-breaker? Just to add, it was an opportunity to compare option names:
I do like how the Also apologies to oxbowlakes for mistyping owbox. From the crossword, I recently learned "sin bin", so for issues I hereby propose "ow box". |
That's intentional. See scala/scala#6123 and scala/scala#6441 There is a natural prioritization because Edit: That makes me think, I guess "defined in a subclass" is not simply a tie-breaker, it gives you an extra point, but so does "returning a subtype". |
Thanks @joroKr21 ! "Aha!" |
The following code compiles under scala 2.12.8 but not under scala 2.13.0 (it fails with ambiguous implicit warnings)
The text was updated successfully, but these errors were encountered: