We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
3.0.1-RC1-bin-20210402-775d881-NIGHTLY
def a(using i: => Int ) = () // ok def b(using => Int ) = () // error def c(using (=> Int)) = () // error
[error] -- [E040] Syntax Error: ~/scala3bug/sbt/src/main/scala/BUG.scala:2:15 [error] 2 |def b(using => Int ) = () // error [error] | ^^ [error] | an identifier expected, but '=>' found [error] -- [E022] Syntax Error: ~/scala3bug/sbt/src/main/scala/BUG.scala:3:15 [error] 3 |def c(using (=> Int)) = () // error [error] | ^^^^^^ [error] | By-name parameter type => Int not allowed here. [error] two errors found
It should compile.
The text was updated successfully, but these errors were encountered:
Allow by-name types in using clauses
d8b8fc1
Fixes scala#11997
93670ff
193844b
Successfully merging a pull request may close this issue.
Compiler version
3.0.1-RC1-bin-20210402-775d881-NIGHTLY
Minimized code
Output
Expectation
It should compile.
The text was updated successfully, but these errors were encountered: