Semantic bug when override var
with val
and no way to extends from a trait that has a var
for a case class
#14722
Labels
Milestone
Compiler version
3.1.1
Minimized code
Output
0001
Expectation
Either does not compile or output
0002
.My intention is that I do not want to introduce a redundant variable just for assigning to trait parameter.
and this does not work:
and this does not work either:
So there's no way to extends from a trait that has a
var
for a case class.The text was updated successfully, but these errors were encountered: