September 16, 2013 [Issue 11052] New: pathSplitter cannot be converted to string[], and to!() template fails | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=11052 Summary: pathSplitter cannot be converted to string[], and to!() template fails Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: andrej.mitrovich@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-09-16 07:33:00 PDT --- ----- import std.array; import std.conv; import std.path; void main() { // ng: toImpl template instance failure string[] x = to!(string[])(pathSplitter("/foo/bar")); // ng: can't convert const(char[])[] => string[] string[] y = pathSplitter("/foo/bar").array; // ng: toImpl template instance failure const(char[])[] z = to!(const(char[])[])(pathSplitter("/foo/bar")); } ----- I'm not sure why .array returns const(char[])[] instead of const(char)[][]. Either way, to!() still won't work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation