www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5152] New: std.conv fails to convert a char[] to string after update to dmd 2.050

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: juanjux gmail.com



---
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: -------
Nov 01 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5152


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5152


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



15:57:33 PST ---
Fixed in http://www.dsource.org/projects/phobos/changeset/2369

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2011