www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10383] New: redundant splitter implementations conflict with each other

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

           Summary: redundant splitter implementations conflict with each
                    other
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: dmitry.olsh gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh gmail.com> 2013-06-16
09:27:47 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10383


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |monarchdodra gmail.com
         Resolution|                            |DUPLICATE


--- Comment #1 from monarchdodra gmail.com 2013-08-22 06:37:20 PDT ---
I'll fix this shortly.

*** This issue has been marked as a duplicate of issue 6730 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 22 2013