-
Notifications
You must be signed in to change notification settings - Fork 21
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
method cannot override immutable value #9840
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9840?orig=1 |
@soc said: maybe I'm not getting the title of this bug report ... what did you have in mind when you wrote "immutable"? |
Svyatoslav Ilinskiy (ilinum) said: That's the error message you get in 2.11 when trying to compile the code. |
@adriaanm said: /Users/adriaan/Library/Preferences/IdeaIC2016.2/scratches/scratch_7.scala:6: error: overriding variable value in class Node of type Option[Boolean];
method value cannot override a mutable variable
override def value = ???
^
/Users/adriaan/Library/Preferences/IdeaIC2016.2/scratches/scratch_7.scala:8: error: overriding variable value in class Node of type Option[Boolean];
method value_= cannot override a mutable variable
override def value_=(b: Option[Boolean]) = ???
^
two errors found |
Svyatoslav Ilinskiy (ilinum) said: Tried it again with 2-12-M5, it does not compile indeed. |
The following code compiles with 2.12 (but it shouldn't) and doesn't compile with plain 2.11
The text was updated successfully, but these errors were encountered: