[Issue 6937] New: new with struct doesn't allow field assignment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 12 08:44:58 PST 2011


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

           Summary: new with struct doesn't allow field assignment
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2011-11-12 08:44:16 PST ---
struct
{
  int a;
}

auto s1 = S(2); // works
auto s2 = new S(2); // doesn't work

----------

New with struct strictly requires a defined constructor while
it should have the same construction rules as a normal struct literal.

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