[Issue 14817] New: copy("foo", "bar") std.algorithm/std.file conflict
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jul 21 05:29:42 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14817
Issue ID: 14817
Summary: copy("foo", "bar") std.algorithm/std.file conflict
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: thecybershadow at gmail.com
/////////// test.d ///////////
import std.algorithm;
import std.file;
void main()
{
copy("test.d", "test2.d");
}
//////////////////////////////
C:\...\std\algorithm\mutation.d(315): Error: cannot modify immutable expression
target[idx]
C:\...\std\algorithm\mutation.d(323): Error: slice target[0..slen] is not
mutable
test.d(6): Error: template instance std.algorithm.mutation.copy!(string,
string) error instantiating
test.d(6): Error: std.file.copy!(string, string).copy at
C:\...\std\file.d(2781) conflicts with std.algorithm.mutation.copy!(string,
string).copy at C:\...\std\algorithm\mutation.d(297)
This is a regression because previously the invariant of
std.algorithm.mutation.copy apparently did not accept (immutable) strings as a
target.
This broke building Digger (along with issue 14765).
Introduced in https://github.com/D-Programming-Language/phobos/pull/2799
--
More information about the Digitalmars-d-bugs
mailing list