Bug 10383 – redundant splitter implementations conflict with each other
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-16T09:27:00Z
Last change time
2013-08-22T06:37:20Z
Assigned to
nobody
Creator
dmitry.olsh
Comments
Comment #0 by dmitry.olsh — 2013-06-16T09:27:47Z
Test case:
import std.algorithm;
import std.array;
void main()
{
string s;
s.splitter(); //here
}
Output:
bug_split.d(7): Error: std.array.splitter!(immutable(char)).splitter at C:\dmd2\windows\bin\..\..\src\phobos\std\array.d(1390) conflicts with std.algorithm.splitter!(string).
Note the contents of both files:
//std.algorithm:
auto splitter(Range)(Range input)
if (isSomeString!Range)
{
return splitter!(std.uni.isWhite)(input);
}
//std.array
auto splitter(C)(C[] s)
if(isSomeString!(C[]))
{
return std.algorithm.splitter!(std.uni.isWhite)(s);
}
2 exactly the same forwarders.
The solution is to have the splitter in std.array be an explicit alias of one in std.algorithm.
Comment #1 by monarchdodra — 2013-08-22T06:37:20Z
I'll fix this shortly.
*** This issue has been marked as a duplicate of issue 6730 ***