digitalmars.D.bugs - [Issue 8051] New: alias member not accessible
- d-bugmail puremagic.com (38/38) May 05 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8051
- d-bugmail puremagic.com (12/12) Dec 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8051
http://d.puremagic.com/issues/show_bug.cgi?id=8051 Summary: alias member not accessible Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: ellery-newcomer utulsa.edu 18:48:23 PDT --- but it should be. dmd 2.059. the code: struct s{ union A{ int i; } A a; alias a.i i; } template FIELD_OFFSET(T, string field){ enum FIELD_OFFSET = cast(size_t) mixin("&(cast(T*)null)." ~ field); } void main(){ pragma(msg, FIELD_OFFSET!(s,"i")); } the fireworks: test.d(9): Error: struct test.s 'i' is not a member test.d(9): Error: struct test.s member i is not accessible test.d(9): Error: this for i needs to be type A not type s test.d(12): Error: template instance test.FIELD_OFFSET!(s,"i") error instantiating cast(ulong)&(__error).i -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 05 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8051 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |DUPLICATE 11:30:55 PST --- *** This issue has been marked as a duplicate of issue 6842 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 02 2012