www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11691] New: can't join pathSplitter with pathSeparator

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11691

           Summary: can't join pathSplitter with pathSeparator
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu



cat > bug.d << CODE
import std.range, std.path;

void bug()
{
    auto comps = pathSplitter("foo/bar");
    auto path = join(comps, pathSeparator);
}
CODE

dmd -c bug

----

This fails because the element type of PathSplitter
is const(C[]) where it should be const(C)[].

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 05 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11691


Martin Nowak <code dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/phobos/pull/1749

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 05 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11691


Martin Nowak <code dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|can't join pathSplitter     |can't join pathSplitter
                   |with pathSeparator          |with dirSeparator



Apparently I should have used dirSeparator but it doesn't affect the bug.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 05 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11691




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/c1251436ba67b39e26f61e54ab79f8ee769fe5e7
fix Issue 11691 - can't join pathSplitter with pathSeparator

- The inferred return type of front had an additional
  layer of const because it's a const method.

https://github.com/D-Programming-Language/phobos/commit/4d3a2c49c8c72a5873f8c64e5b49b6a9ab897382


fix Issue 11691 - can't join pathSplitter with pathSeparator

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 05 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11691


Martin Nowak <code dawg.eu> changed:

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 05 2013