www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15918] New: [2.070] Results from findSplit can no longer be


          Issue ID: 15918
           Summary: [2.070] Results from findSplit can no longer be
                    assigned to each other
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: Jesse.K.Phillips+D gmail.com

I'm creating this as a regression as the below code was valid in DMD 2.069 but
no longer works in 2.070. It was introduced by this[1] commit. Though it may be
better to consider this a feature request to make the error message more


    import std.algorithm;

    void main() {
        auto str = "sep,one,sep,two";

        auto split = str.findSplitAfter(",");
        assert(split[0] == "sep,");
        split = split[1].findSplitAfter(",");
        assert(split[0] == "one,");
        split = split[1].findSplitBefore(",");
        assert(split[0] == "sep");

test.d(10): Error: function std.algorithm.searching.findSplitAfter!("a == b",
string, string).findSplitAfter.Result!(str
ing, string).Result.opAssign (Result!(string, string) p) is not callable using
argument types (Result!(string, string))

Apr 12 2016