Summary: alias member not accessible
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Ellery Newcomer <> 2012-05-05 
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

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to