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
[error] ./main.scala:14:16: error overriding variable value in traitA of typeInt;
[error] method value of type=>Int cannot override a mutable variable
[error] overridedefvalue:Int=???
[error] ^
Expectation
Compile correctly
Additional info
This is most likely related to issue #14722 and PR that fixed it #14724
Also, note that the following code throws an error too
[error] ./main.scala:11:16: error overriding variable value in traitA of typeInt;
[error] method value of type=>Int cannot override a mutable variable
[error] overridedefvalue:Int=???
[error] ^
[error] ./main.scala:12:16: error overriding variable value in traitA of typeInt;
[error] method value_= of type (newValue: Int):Unit cannot override a mutable variable
[error] overridedefvalue_=(newValue: Int):Unit=???
[error] ^
The text was updated successfully, but these errors were encountered:
Compiler version
3.1.3-RC3
,3.2.0-RC1-bin-20220517-e5abec0-NIGHTLY
(compiles correctly on
3.1.2
,3.0.2
, and2.13.8
)Minimized code
Output
Expectation
Compile correctly
Additional info
This is most likely related to issue #14722 and PR that fixed it #14724
Also, note that the following code throws an error too
namely
The text was updated successfully, but these errors were encountered: