https://issues.dlang.org/show_bug.cgi?id=22362
Issue ID: 22362
Summary: ImportC: error parsing compound literal with more than
one value at function scope.
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
// compound.c
typedef struct Foo {
int x, y;
} Foo;
Foo gfoo = (Foo){0, 1}; // no error
int main(int argc, char** argv){
Foo foo1 = (Foo){0}; // no error
Foo foo2 = (Foo){0, 1}; // error here
}
compound.c(9): Error: found `=` when expecting `;` or `=`, did you mean `Foo
foo2 = (`?
compound.c(9): Error: found `=` instead of statement
compound.c(9): Error: identifier or `(` expected
compound.c(10): Error: identifier or `(` expected
--