[Issue 9397] New: Size error with struct with ctor and self-typed nested enum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 25 18:53:54 PST 2013


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

           Summary: Size error with struct with ctor and self-typed nested
                    enum
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-25 18:53:53 PST ---
struct S
{
    this(int i) { }
    int i;
    enum s = S(0);  // L5: fail
}

void main() { }

Error: cannot create a struct until its size is determined

This used to be a wrong-code bug (see Issue 8741), but now it's an error.

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


More information about the Digitalmars-d-bugs mailing list