Summary: mixing field into anonymous struct inside class
                    generates field overlapping vtable
           Product: D
           Version: 1.035
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

template M() { int i; }
class Z { struct { mixin M!(); } }
void main() { Z z; writefln(z.i.offsetof); }

// output: 0

dmd uses offset=0 internally, meaning that if 'i' is written to, the vtable is


Reply via email to