module test; import std.algorithm; import std.array; import std.file; void main() { auto dFiles = filter!`endsWith(a.name,".d")`(dirEntries(".",SpanMode.depth)); auto arr1 = array(dFiles); // OK auto arr2 = array(dirEntries(".",SpanMode.depth)); // NG?? } test.d(11): Error: template std.array.array(Range) if (isIterable!(Range) && !isNarrowString!(Range)) does not match any function template declaration test.d(11): Error: template std.array.array(Range) if (isIterable!(Range) && !isNarrowString!(Range)) cannot deduce template function from argument types !()(DirIterator)
Still present in 2.058.
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/58f1b2bc512059bbd36c36324208ed062ffea8f9 Merge pull request #495 from blackwhale/issue-7138 dirEntries issues 7264 & 7138