May 09, 2012 [Issue 8070] New: associative array element is created before value is ready | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8070 Summary: associative array element is created before value is ready Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: luka8088@owave.net --- Comment #0 from luka8088 <luka8088@owave.net> 2012-05-09 00:03:22 PDT --- I may be mistaken but, as far as I know the fact that 'arr["x"] is created and set to null' before 'new object of class A is created' is a bug. Right ? -------------------------------------------------------- /* Order of execution (is this a bug ?): * - arr["x"] is created and set to null * - new object of class A is created * - arr["x"] is set to newly created object */ module program; A[string] arr; class A { this () { // at this point: // ("x" in arr) is true // arr["x"] is set to null } } void main () { arr["x"] = new A(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 09, 2012 [Issue 8070] associative array element is created before value is ready | ||||
---|---|---|---|---|
| ||||
Posted in reply to luka8088 | http://d.puremagic.com/issues/show_bug.cgi?id=8070 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jmdavisProg@gmx.com Resolution| |DUPLICATE --- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-05-09 00:21:06 PDT --- *** This issue has been marked as a duplicate of issue 3825 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation