[Issue 8117] New: Cannot initialize struct member without default constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 18 17:00:32 PDT 2012


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

           Summary: Cannot initialize struct member without default
                    constructor
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: wfunction at hotmail.com


--- Comment #0 from wfunction at hotmail.com 2012-05-18 17:02:05 PDT ---
struct S
{
    @disable this();
    this(int) { }
}

class T { S s = S(1); }
void main() { new T(); }


Error: default construction is disabled for type T


^ wat?
Why is it looking for a default constructor?

-- 
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