On Friday, 14 June 2013 at 10:07:13 UTC, Andrea Fontana wrote:
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?
I'm not seeing a crash here: http://dpaste.dzfl.pl/59d5fb36
What version of the compiler/phobos are you using?