Summary: enum structs with ctor
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-05-07 16:31:20 PDT ---
D2 code:

struct Foo {
    int x;
    this(int xx) {
        this.x = xx;
void main() {
    enum f = Foo(10);

DMD 2.053beta is not able to compile it, and shows the errors:

test.d(8): Error: variable __ctmp3 cannot be read at compile time
test.d(8): Error: cannot evaluate __ctmp3.this(10) at compile time

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

Reply via email to