Summary: "void initializer has no value" on struct/union
                    members initialized to "void"
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Graham Fawcett <> 2010-06-15 
10:37:45 PDT ---
The following code fails to compile:

struct Foo {
    int[1] a = void;
void main() {
    Foo f = Foo();

$ dmd err.d
err.d(2): Error: void initializer has no value

Removing the "= void" initializer resolves the issue.
The error is not related to the size of the array, or the element type.

Note that phobos/std/variant.d, line 192, has such a declaration, 
which causes some variant-using application code to fail with the same
error message.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to