[Issue 10804] regression(2.063=>2.064) problem with Appender or dmd?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 13 05:08:45 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10804
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2013-08-13 05:08:37 PDT ---
This regression is caused by recent Appender change:
https://github.com/D-Programming-Language/phobos/commit/4da1639c98cb73d07858b17c2d225063889e4700
, but essentialy this is a dmd bug.
Reduced case:
string identity(string a) { return a; }
string fun()
{
char[] s;
s.length = 14;
s[0 .. 14] = "identity(`Ω`)"[];
return cast(string)s;
}
void main()
{
enum a1 = "identity(`Ω`)";
enum a2 = fun(); // fun() returns a string which originally mutable
array
static assert(cast(ubyte[])mixin(a1) == [0xCE, 0xA9]);
static assert(cast(ubyte[])mixin(a2) == [0xCE, 0xA9]); // fails!
}
--
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