D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15918 - [2.070] Results from findSplit can no longer be assigned to each other
Summary: [2.070] Results from findSplit can no longer be assigned to each other
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: Andrei Alexandrescu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-12 20:13 UTC by Jesse Phillips
Modified: 2016-05-24 13:04 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jesse Phillips 2016-04-12 20:13:31 UTC
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 reasonable.

1. https://github.com/D-Programming-Language/phobos/commit/b6a61d9e719a9d680936db44b98fbb5dd28bf6b1

-------------------------
    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))
Comment 1 Per Nordlöw 2016-05-24 07:40:21 UTC
Solved at https://github.com/dlang/phobos/pull/4349