Bug 7138 – Can't call array() on dirEntries

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-12-19T12:38:00Z
Last change time
2012-04-13T09:50:26Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2011-12-19T12:38:05Z
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)
Comment #1 by eco — 2012-02-21T19:55:36Z
Still present in 2.058.
Comment #2 by github-bugzilla — 2012-03-17T10:20:13Z
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