Something goes wrong with range and sort?
Andrea Fontana
nospam at example.com
Fri Jun 14 03:07:11 PDT 2013
string[] test_filter(string[] words)
{
static blackList =
[
"d", "c", "e", "a", "è", "é", "e"
].sort();
return words.filter!((a) =>
!blackList.assumeSorted.contains(a)).array;
}
test_filter(["a", "b", "test", "hello"]).writeln;
This code crash! It's just a useless trimmed-down version of a
more complex code, just to show you the bug.
If you remove accented letters from "blacklist" array it works
fine. Why?
More information about the Digitalmars-d
mailing list