Summary: Can't deduce sizeof inner struct inside a template mixin
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

The following code triggers an error:

template Foo()
    uint getSize()
        return (*this).sizeof; // line 5

void main()
    struct A1
        mixin Foo!(); // line 13

test.d(5): struct test.main.A1 no size yet for forward reference
test.d(13): mixin test.main.A1.Foo!() error instantiating


Reply via email to