← Back to index
|
Original Bugzilla link
Bug 7609 – Can't access field of aliased type via 'with' statement
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-29T05:52:00Z
Last change time
2013-02-08T15:35:49Z
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0
by andrej.mitrovich — 2012-02-29T05:52:37Z
import std.stdio; struct Foo { int x; } struct Bar { Foo foo; alias foo this; } void main() { Bar bar; writeln(bar.x); // ok with (bar) { writeln(x); // fail } } test2.d(23): Error: undefined identifier x
Comment #1
by andrej.mitrovich — 2013-02-08T15:35:49Z
*** This issue has been marked as a duplicate of issue 6711 ***