https://issues.dlang.org/show_bug.cgi?id=19060
--- Comment #6 from RazvanN <razvan.nitu1...@gmail.com> --- (In reply to johanengelen from comment #5) > OK, then this is still broken and should receive a deprecation message too: > > ``` > struct S { > int a; > bool x; > public ref foo() { > alias yoyo = this.x; > return yoyo; > } > } > ``` Actually, I don't think it should. Foo can only be called on an instance, therefore `this` does make sense in that context. Imagine that you would define a local variable x, if you wouldn't be able to use `this` then the local would mask the member everywhere. I suggest to close this as invalid. --