March 03, 2014 [Issue 12295] New: wrongly accepts ctor with optional parameter | ||||
---|---|---|---|---|
| ||||
https://d.puremagic.com/issues/show_bug.cgi?id=12295 Summary: wrongly accepts ctor with optional parameter Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: timothee.cour2@gmail.com --- Comment #0 from Timothee Cour <timothee.cour2@gmail.com> 2014-03-03 15:43:28 PST --- D20140303T153856 struct A{ int x; this(int x=10){this.x=x;} //Shouldn't allow this as we can't have parameter-less ctors } void main(){ auto a=A(); assert(a.x==10); //FAILS } -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 04, 2014 [Issue 12295] wrongly accepts ctor with optional parameter | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timothee Cour | https://d.puremagic.com/issues/show_bug.cgi?id=12295 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich@gmail.com Resolution| |DUPLICATE --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2014-03-04 02:59:32 PST --- *** This issue has been marked as a duplicate of issue 3438 *** -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation