[Issue 22052] New: Struct array initializer for enum member fails to compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 20 20:15:30 UTC 2021


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 at puremagic.com
          Reporter: maxsamukha at gmail.com

struct Dependency {
    string name;
}

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

void main() {}

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

--


More information about the Digitalmars-d-bugs mailing list