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

           Summary: Structs with disabled default construction can't be
                    used as `out` parameters
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2013-07-13 
19:27:41 MSD ---
---
struct S
{ @disable this(); }

void f(out S) { } // no errors here

void main()
{
    S s = S.init;
    f(s); // Error: struct main.S default construction is disabled
}
---

As disabled default construction may be also interpreded as "not for `out`
parameters" (and yes, it breaks the code) it is absolutely inconsistent that
the error is in function usage but not in the declaration.

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

Reply via email to