http://d.puremagic.com/issues/show_bug.cgi?id=3730

           Summary: Struct's explicit constructor can't initialize global
                    variables
           Product: D
           Version: 2.039
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: tomeks...@gmail.com


--- Comment #0 from Tomasz SowiƄski <tomeks...@gmail.com> 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
appealing.

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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to