Closed
Description
I can't say definitively this is a bug. But I think it should be. There is only one thing which "this.x" can mean. It looks to me like this could be implemented with some extra logic in typedAssign.
class A(var x: Int)
class B(x: Int) extends A(x) { def update(z: Int) = this.x = z }
a.scala:2: error: reassignment to val
class B(x: Int) extends A(x) { def update(z: Int) = this.x = z }
^
one error found
I would expect it to work like the common situation (common in java anyway) where one does:
def f(x: Int) = this.x = x