We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.6.3
//import Settings.* object Settings { def x = 0 } case class Settings(value: Double = x)
➜ snips scala-cli compile --server=false -S 2.13.16 default-arg-hygiene.scala /home/amarki/snips/default-arg-hygiene.scala:8: error: not found: value x case class Settings(value: Double = x) ^ 1 error Compilation failed ➜ snips scala-cli compile --server=false -S 3.6.3 default-arg-hygiene.scala ➜ snips
Obviously, x is not visible at the default arg. Successful compilation is an artifact of bad hygiene.
x
Expect (and require) an error as in Scala 2.
Observed at #22690 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Compiler version
3.6.3
Minimized code
Output
Expectation
Obviously,
x
is not visible at the default arg. Successful compilation is an artifact of bad hygiene.Expect (and require) an error as in Scala 2.
Observed at #22690 (comment)
The text was updated successfully, but these errors were encountered: