www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13318] New: Error: cannot have e.tuple

https://issues.dlang.org/show_bug.cgi?id=13318

          Issue ID: 13318
           Summary: Error: cannot have e.tuple
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: ellery-newcomer utulsa.edu

the code:

struct Base2 {
    int i;
}

mixin template NoPadding(T) {
    alias Ts = typeof(T.tupleof);
    Ts fields;
}

struct Derived {
    mixin NoPadding!Base2 _base2;
}

void main() {
    Derived* d;
    int* i = &d._base2.fields[0];
}


the compile:

dmd test2.d

(2.065, 2.066rc2)

the wat:

test2.d(16): Error: cannot have e.tuple

--
Aug 17 2014