[Issue 3438] New: constructor with defaulted parameters ignored
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 23 07:44:34 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3438
Summary: constructor with defaulted parameters ignored
Product: D
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrei at metalanguage.com
--- Comment #0 from Andrei Alexandrescu <andrei at metalanguage.com> 2009-10-23 07:44:31 PDT ---
struct foo {
this(int dummy = 0) { writeln("Default constructor");}
}
void main() {
foo x = foo();
}
does not print anything. The code should either not compile or print something.
I think at some point we'll need to support default constructors that execute
code.
--
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