www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22052] New: Struct array initializer for enum member fails to

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

          Issue ID: 22052
           Summary: Struct array initializer for enum member fails to
                    compile
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: maxsamukha gmail.com

struct Dependency {
    string name;
}

enum {
    Dependency[] dependencies = [
        { name: "foo" }
    ]
}

void main() {}

onlineapp.d(7): Error: found `}` when expecting `;` following statement

--
Jun 20