digitalmars.D.bugs - [Issue 3456] New: ref foreach over array in CTFE silently fails.
- d-bugmail puremagic.com (37/37) Oct 30 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3456
- d-bugmail puremagic.com (6/6) Nov 02 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3456
- d-bugmail puremagic.com (12/12) Dec 29 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3456
http://d.puremagic.com/issues/show_bug.cgi?id=3456 Summary: ref foreach over array in CTFE silently fails. Product: D Version: 2.035 Platform: Other OS/Version: Windows Status: NEW Keywords: diagnostic, wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: dsimcha yahoo.com Test program: import std.stdio; char[] ctfeFun() { char[] stuff = "This is clearly a bug.".dup; foreach(ref c; stuff) { c = 'X'; } return stuff; } const compileTimeResult = ctfeFun(); void main() { writeln("Compile time: ", compileTimeResult); writeln("Run time: ", ctfeFun()); } Output: Compile time: This is clearly a bug. Run time: XXXXXXXXXXXXXXXXXXXXXX Marking as severe because, IMHO, anything that silently results in subtly defective code being generated is pretty serious. If this can't be easily fixed, then it should be an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 30 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3456 This is a duplicate of bug 1330. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 02 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3456 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug yahoo.com.au Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 1330 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 29 2009