Summary: Regression (2.047): Cannot create enum of struct with
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Johann MacDonagh <> 2011-06-16 
16:33:33 PDT ---
struct Test
    this(int a)

void main()
    enum a = Test(5);

This compiled on 2.046 but no longer does. The error messages have changed over
the versions, but current 2.053 complains:

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

enum a = Test();

This works fine.

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

Reply via email to