https://issues.dlang.org/show_bug.cgi?id=22321
Issue ID: 22321
Summary: ImportC: non-static arrays can’t be initialized by an
initializer list.
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Demonstration of the problem:
int gnumbers[4] = {1,2,3,4}; // ok
int example(void){
int numbers[4] = {1, 2, 3, 4}; // Error: variable `test.example.numbers` is
not a static and cannot have static initializer
return numbers[1];
}
--