Bug 11691 – can't join pathSplitter with dirSeparator

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-05T06:13:00Z
Last change time
2015-06-09T05:15:22Z
Keywords
pull
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2013-12-05T06:13:43Z
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)[].
Comment #1 by code — 2013-12-05T06:23:31Z
Comment #2 by code — 2013-12-05T06:56:37Z
Apparently I should have used dirSeparator but it doesn't affect the bug.
Comment #3 by github-bugzilla — 2013-12-05T08:45:41Z
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 Merge pull request #1749 from dawgfoto/fix11691 fix Issue 11691 - can't join pathSplitter with pathSeparator