www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19765] New: std.algorithm.searching.findAmong doesn't `save`

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

          Issue ID: 19765
           Summary: std.algorithm.searching.findAmong doesn't `save` like
                    it should
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: ag0aep6g gmail.com

import std.algorithm;
import std.range;
void main()
{
    auto choices = inputRangeObject("b");
    auto f = "foobar".findAmong(choices);
    assert(equal(f, "bar")); /* fails; should pass */
}

--
Mar 26 2019