Bug 2787 – Members found in an 'alias this' are not implicitly accessible in methods

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2009-04-02T17:19:00Z
Last change time
2015-06-09T01:18:03Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
jarrett.billingsley

Comments

Comment #0 by jarrett.billingsley — 2009-04-02T17:19:21Z
struct Base { int x; void foo() { writefln("%s", x); } } struct Derived { Base _base; alias _base this; int y; void bar() { writefln("%s, %s", x, y); } // line 16 } foo.d(16): Error: undefined identifier x But 'this.x' works.
Comment #1 by hoganmeier — 2011-08-14T07:32:32Z
*** Issue 6481 has been marked as a duplicate of this issue. ***
Comment #2 by k.hara.pg — 2011-08-15T12:44:22Z
Comment #3 by bugzilla — 2011-08-24T22:35:02Z