https://issues.dlang.org/show_bug.cgi?id=17066

Martin Nowak <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |[email protected]
         Resolution|FIXED                       |---

--- Comment #5 from Martin Nowak <[email protected]> ---
cat > bug.d << CODE
import std.algorithm : joiner, map;

auto matchIssueRefs(string message)
{
    import std.regex;
    return message.matchAll(`a|b`).joiner;
}

void getIssueRefs(string[] messages)
{
    messages.map!(m => m.matchIssueRefs).joiner;
}
CODE
dmd -c -o- bug
----
/usr/include/dmd/phobos/std/algorithm/iteration.d-mixin-2442(2456): Error:
cannot modify struct this._current Result with immutable members
bug.d(11): Error: template instance
std.algorithm.iteration.joiner!(MapResult!(__lambda2, string[])) error
instantiating
----

Thanks for the fix, but it only seems to solves half of the problem, still
getting this error with a nested `joiner`.

--

Reply via email to