digitalmars.D.bugs - [Issue 8741] New: [CTFE] Incorrect static array assign results in constructor
- d-bugmail puremagic.com (37/37) Sep 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8741
- d-bugmail puremagic.com (19/19) Oct 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8741
- d-bugmail puremagic.com (10/10) Oct 02 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8741
- d-bugmail puremagic.com (10/10) Jan 02 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8741
- d-bugmail puremagic.com (10/10) Jan 02 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8741
- d-bugmail puremagic.com (10/10) Jan 16 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8741
- d-bugmail puremagic.com (10/10) Feb 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8741
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Summary: [CTFE] Incorrect static array assign results in constructor Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: peter.alexander.au gmail.com 16:42:16 PDT --- struct Vec2 { this(float x) { m[0] = x; m[1] = x; } float[2] m; static Vec2 zeroes = Vec2(0); } void main() { import std.stdio; writeln(Vec2.zeroes); } Output is: Vec2([0, nan]) http://dpaste.dzfl.pl/77058efc Using two parameters for the constructor makes the bug go away: http://dpaste.dzfl.pl/7ea20ba0 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 30 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |clugdbug yahoo.com.au Summary|[CTFE] Incorrect static |wrong code for struct |array assign results in |member initialized using |constructor |struct constructor Was "CTFE: Incorrect static array assign results in constructor" This doesn't involve CTFE, it's a semantic error. It is deciding if Vec2(0) is a struct literal or a constructor, before it has worked out that Vec2 even has a constructor. So it decides (incorrectly) that it's a struct literal. It doesn't require static arrays, either. The constructor just doesn't get called at all. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 02 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull https://github.com/D-Programming-Language/dmd/pull/1157 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 02 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/39207df0a43e1a39a4dcd169505758884cb992d3 Fix issue 8741 wrong code for struct member init using struct ctor Generate an error if we need to decide if it is a ctor or not, when we haven't determined the size yet. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 02 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 02 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sludwig outerproduct.org *** Issue 3863 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 16 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8741 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus_lindberg live.se *** Issue 9519 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2013