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

           Summary: struct ctor with defaulted parameters should not be
                    allowed
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-09-02 
09:59:30 PDT ---
-----
struct S
{
    this(int x = 1) { assert(0); }  // never throws
}

void main()
{
    auto s = S();
}
-----

If we're really never going to support user-provided default ctors (like it is
now), then the above should become a compile-time error. That default argument
can't be used.

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

Reply via email to