Summary: Struct's explicit constructor can't initialize global
           Product: D
           Version: 2.039
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Tomasz SowiƄski <> 2010-01-20 12:20:09 
PST ---
Test case:

struct S {
    int a;
    this(int a) {
        this.a = a;
    static immutable S es = S(3);

Compiler output (message printed twice in original):
test.d|9|Error: cannot evaluate ((S __ctmp516;
test.d|9|Error: cannot evaluate ((S __ctmp516;

Don't know if that should compile but surely the message could be more

static this() may be used as a workaround for this bug.

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

Reply via email to