-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Opaque types and implicit specificity #9928
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 would not expect However, I understand that it is confusing that the (preceding) import shadows the local definition. Ergonomically, this is related to #9880. |
I was also confused #8092 In fact, I'm still confused. |
Thanks for reminding me of that issue @som-snytt. There is indeed three different behaviors that would be justifiable.
|
Fix #9928: Don't treat import contexts as properly nested
Minimized code
Output
In string
Expectation
In foo
Remarks
import Magic.{given _}
is removed, the output is as expected. The question is: should this import change the behavior?given Magic[Foo]
should be more specific and preferred togiven Magic[String]
Snippet
https://scastie.scala-lang.org/vincenzobaz/tGQhSpQ8TQyiOeTNAvSGbA/104
The text was updated successfully, but these errors were encountered: