You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the announcement of 2.11.0-RC1, I report an issue I have with code that compiles file under 2.10.3 but does not compile under 2.11.0-RC1.
The issue can be reduced to the following minimal case:
Welcome to Scala version 2.10.3 (JavaHotSpot(TM) 64-BitServerVM, Java1.7.0_51).
Type in expressions to have them evaluated.
Type:help for more information.
scala>:paste
// Entering paste mode (ctrl-D to finish)objectAextendsAclassA {
privatevara:Boolean=falsedefrun { A.a =true }
}
// Exiting paste mode, now interpreting.
defined module A
defined classA
scala>
The same code fails to compile with Scala 2.11.0-RC1
Welcome to Scala version 2.11.0-RC1 (JavaHotSpot(TM) 64-BitServerVM, Java1.7.0_51).
Type in expressions to have them evaluated.
Type:help for more information.
scala>:paste
// Entering paste mode (ctrl-D to finish)objectAextendsAclassA {
privatevara:Boolean=falsedefrun { A.a =true }
}
// Exiting paste mode, now interpreting.
<console>:10:error: value a is not a member of objectAdefrun { A.a =true }
^
scala>
The text was updated successfully, but these errors were encountered:
This was changed under #7475. We double checked with Martin, and with the behaviour of Javac, which does the same thing. (Java doesn't have companions, but you can emulate the same thing with nested classes)
According to the announcement of 2.11.0-RC1, I report an issue I have with code that compiles file under 2.10.3 but does not compile under 2.11.0-RC1.
The issue can be reduced to the following minimal case:
The same code fails to compile with Scala 2.11.0-RC1
The text was updated successfully, but these errors were encountered: