[Issue 6299] New: Auto constructor for heap structs too
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 12 12:00:23 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6299
Summary: Auto constructor for heap structs too
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-07-12 11:55:14 PDT ---
Regarding "Removing limitations", I'd like this to compile with no need to
write a constructor:
struct Foo { int x; }
void main() {
auto f = new Foo(1);
}
In DMD 2.054 this gives:
test.d(3): Error: no constructor for Foo
--
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