http://d.puremagic.com/issues/show_bug.cgi?id=2866

           Summary: Can't declare static struct inside function scope
           Product: D
           Version: 2.029
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: dsim...@yahoo.com


void foo() {
    static struct Bar {
        uint doStuff() {
            return a;
        }
    }
}

D:\code\test.d(4): basic type expected, not struct
D:\code\test.d(4): no identifier for declarator int
D:\code\test.d(4): semicolon expected, not 'struct'

Before nested structs, one could declare a non-nested struct inside a function
scope by simply omitting the static keyword.


-- 

Reply via email to