[Issue 5852] CTFE: wrong code for string[] ~= const(string)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 18 04:11:21 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5852
kennytm at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kennytm at gmail.com
--- Comment #1 from kennytm at gmail.com 2011-04-18 04:07:48 PDT ---
Correct code is generated only when the constness of the string match. Another
example:
--------------------------------------
import std.stdio;
auto x(string y) {
const(string)[] z;
z ~= y;
z ~= y;
return z;
}
static assert(x("abc").length != 6);
--------------------------------------
--
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