[Issue 13468] std.algorithm.canFind(null) fails with class
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Oct 1 21:31:22 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13468
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at quickfur.ath.cx
--- Comment #1 from hsteoh at quickfur.ath.cx ---
Found the cause of the bug. The problem is that when comparing two class
references, the default predicate attempts to compare two class references with
==, which appears to dereference a NULL and cause a segfault. If "a is b" is
used as predicate instead, there is no crash. Next is to find out why ==
doesn't handle null pointers correctly...
--
More information about the Digitalmars-d-bugs
mailing list