-
Notifications
You must be signed in to change notification settings - Fork 21
Adding curly braces changes implicit resolution (involving type lambdas and partial unification) #10213
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
Imported From: https://issues.scala-lang.org/browse/SI-10213?orig=1
|
@milessabin said: |
@milessabin Yeah, I phrased this poorly. The main point of this bug report is that Also, in no way is adding extra braces a workaround, because it makes the types defined inside block local and thus invisible to the outside. |
Can cause ambiguous implicits, so is under a compiler flag -Yhk-typevar-unification. Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
Can cause ambiguous implicits, so is under a compiler flag -Yhk-typevar-unification. Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
Can cause ambiguous implicits, so is under a compiler flag -Yhk-typevar-unification. Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
Can cause ambiguous implicits, so is under a compiler flag -Yhk-typevar-unification. Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
Can cause ambiguous implicits, so is under the compiler flag -Xsource:2.13 Fixes scala/bug#10185 Fixes scala/bug#10195 Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
Can cause ambiguous implicits, so is under the compiler flag -Xsource:2.13 Fixes scala/bug#10185 Fixes scala/bug#10195 Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
Can cause ambiguous implicits, so is under the compiler flag -Xsource:2.13 Fixes scala/bug#10185 Fixes scala/bug#10195 Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
Compile the attached file with
-Ypartial-unification
.Focus on the difference between
Test1
andTest2
, which differ only in the extra pair of braces ({ }) around some code. That extra pair of braces helps implicit resolution, which otherwise fails. The claim of this bug report is that those braces should not be necessary.A bunch of smaller working examples is added in
Test3
, which explains why the minimal failing case is so complex.I inline the contents of the attached file for easy reference:
The text was updated successfully, but these errors were encountered: