http://d.puremagic.com/issues/show_bug.cgi?id=9493

           Summary: std.algorithm.canFind returns true for empty string in
                    array of integers
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: monkeywork...@hotmail.com


--- Comment #0 from monkeywork...@hotmail.com 2013-02-09 23:58:48 PST ---
It seems that std.algorithm.canFind returns true when checking for the empty
string within an array of integers. This seems like unintended behaviour to me,
so I'm reporting it as a bug. This bug is present on at least DMD 2.061.

Example:
import std.algorithm;

void main()
{
    //This assertion should fail, but doesn't
    assert(canFind([1, 2, 3, 4], ""));
}

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

Reply via email to