Comment #0 by bearophile_hugs — 2012-12-02T11:27:16Z
Sometimes it's handy to use alias to shorten a instance.attribute name that's used often in some code:
struct Foo { int x; }
void main() {
Foo f;
alias fd = f.x;
fd = 1;
}
DMD 2.061alpha:
test2.d(5): Error: need 'this' to access member x
This is an enhancement request, but also that error message doesn't seem good.
Comment #1 by andrej.mitrovich — 2012-12-02T11:29:39Z
*** This issue has been marked as a duplicate of issue 6842 ***