[Issue 5152] New: std.conv fails to convert a char[] to string after update to dmd 2.050
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 1 12:44:58 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5152
Summary: std.conv fails to convert a char[] to string after
update to dmd 2.050
Product: D
Version: D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: juanjux at gmail.com
--- Comment #0 from Juanjo Alvarez <juanjux at gmail.com> 2010-11-01 12:44:01 PDT ---
Test code:
import std.conv;
void main()
{
char[4] test = ['a', 'b', 'c', 'd'];
string fail = to!string(test);
}
This fails with some template ambiguity (it seems):
/home/juanjux/sync/work/d/dmd2/src/phobos/std/conv.d(95): Error: template
std.conv.toImpl(T,S) if (!implicitlyConverts!(S,T) && isSomeString!(T) &&
isInputRange!(Unqual!(S)) && isSomeChar!(ElementType!(S))) toImpl(T,S) if
(!implicitlyConverts!(S,T) && isSomeString!(T) && isInputRange!(Unqual!(S)) &&
isSomeChar!(ElementType!(S))) matches more than one template declaration,
/home/juanjux/sync/work/d/dmd2/src/phobos/std/conv.d(110):toImpl(T,S) if
(!implicitlyConverts!(S,T) && isSomeString!(T) && isInputRange!(Unqual!(S)) &&
isSomeChar!(ElementType!(S))) and
/home/juanjux/sync/work/d/dmd2/src/phobos/std/conv.d(220):toImpl(T,S) if
(isStaticArray!(S))
Notice too how the error message is a nightmare - it doesn't specify the source
file where the failed "to!" is.
--
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