[Issue 11052] New: pathSplitter cannot be converted to string[], and to!() template fails
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 16 07:33:01 PDT 2013
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 at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at 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: -------
More information about the Digitalmars-d-bugs
mailing list