[Issue 10406] New: std.conv.to of string array to fixed sized array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 18 10:46:34 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10406

           Summary: std.conv.to of string array to fixed sized array
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-06-18 10:46:33 PDT ---
import std.conv: to;
void main() {
    auto xy = ["1", "2"].to!(int[2]);
}


DMD 2.063.2 gives:

...\dmd2\src\phobos\std\conv.d(1325): Error: cannot implicitly convert
expression (result) of type int[] to int[2u]
...\dmd2\src\phobos\std\conv.d(276): Error: template instance
std.conv.toImpl!(int[2u], string[]) error instantiating
temp.d(3):        instantiated from here: to!(string[])
temp.d(3): Error: template instance std.conv.to!(int[2u]).to!(string[]) error
instantiating

-- 
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