Closed som-snytt closed 3 months ago
This would be a good little starter project for somebody, either in Scala 2 or Scala 3 or both.
In Scala 3 (3.4.0-RC3), instead of "mutated x" it actually shows the new value, which seems like a better design:
scala> var x = 42
var x: Int = 42
scala> x = 20
x: Int = 20
But Scala 3 also fails to handle +=
and friends the same way it handles plain assignment
scala> x += 10
scala>
Reproduction steps
Scala version: 2.13
Problem
It should say that x was mutated by assignment
+=
.