-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Context bound behaves differently from a using-clause #20070
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
It compiles under A footnote is that 3.4 also warns and offers a rewrite, but I don't think the rewrite works while there is an error, so that is an interesting conundrum.
|
There's a related issue with context bounds that I reported a while back; where a warning generates a notice of an available automatic |
This is very weird. And indeed, true. |
This was fixed in 3.6 (last summer, released at end of year), probably just the "release the hounds" PR to "switch mapping", i.e., flags. That is why just the application was confused. |
Tests for scala#19413, scala#20070 and scala#23122
Tests for scala#19413, scala#20070 and scala#23122 [Cherry-picked dfabe4f][modified]
Compiler version
3.3.1, 3.4.1
Minimized code
Output
Expectation
Scala 3 Book suggests that context bound de-sugaring mirrors the following code:
Yet, the latter doesn't lead to a compile error in
f[Int](1)
.The text was updated successfully, but these errors were encountered: