[Issue 14925] replaceInPlace fail compilation
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 17 05:27:24 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14925
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
Once again, the "specialized" nature of strings comes back to bite us.
The call matches the second overload (which just calls replace, and overwrites
the original slice), because char[] is an input range, and char[]
"isSomeString" and char[] has element type of dchar.
I think probably we need to verify in that branch of the if statement that T is
immutable or const, or the element encoding type of the array is not T.
--
More information about the Digitalmars-d-bugs
mailing list