www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12083] New: std.path.absolutePath doesn't accept mutable strings

https://d.puremagic.com/issues/show_bug.cgi?id=12083

           Summary: std.path.absolutePath doesn't accept mutable strings
           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



07:14:08 PST ---
-----
import std.path;

void main()
{
    char[] path = ".".dup;
    auto abs = path.absolutePath;
}
-----

$ dmd test.d
 test.d(8): Error: function std.path.absolutePath (string path, lazy string
base = getcwd()) is not callable using argument types (char[])
I think absolutePath should probably be typed as this or something similar: inout(char)[] absolutePath(inout(char)[] path, lazy inout(char)[] base = getcwd()) -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 05 2014