www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6168] New: Regression (2.047): Cannot create enum of struct with constructor

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6168

           Summary: Regression (2.047): Cannot create enum of struct with
                    constructor
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: johann.macdonagh gmail.com



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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6168


kennytm gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |kennytm gmail.com
         Resolution|                            |FIXED



Apparently fixed on git master (2.054) already before you file the bug :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 17 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6168


kennytm gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |DUPLICATE



*** This issue has been marked as a duplicate of issue 5954 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 17 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6168




06:59:51 PDT ---
D'oh! I searched for a duplicate before posting, so I don't know how I missed
that. Perfect!

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