This constantly bugs me:
class Test(i: Int) {
val this.i = i;
val this.ii = i; // :(
}
I would like to declare all my vals/vars the same way, and I really don't understand why that this upsets the Scala compiler. Everywhere else this performs as expected except here.
- Is there a good reason why it won't let me punch in that this?
- Is there a better way/ a way around it/ a Scala way?