As of phobos revision 2032 or 2033 (2032 doesn't compile it seems, so I don't know which one the breaking changes are in), this no longer compiles: import std.algorithm; import std.ctype; void main() { immutable str = "1234567890"; assert(!canFind!((c){return !isdigit(c);})(str)); } If you change str to auto, then it works just fine. const and immutable, however, will no longer compile. My guess is that it has to do with the changes that David has been doing towards making phobos more const-correct, and so he's probably aware of the problem, but I figured that I might as well report the bug just in case. Regardless, I guess that I get to avoid using immutable strings for the time being...
The recent IFTI changes making it so that arrays are treated as tail-const for IFTI fixes this issue.