February 08, 2016
https://issues.dlang.org/show_bug.cgi?id=15658

          Issue ID: 15658
           Summary: isFile isn't a template
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: cpicard@openmailbox.org

I get a strange error when not using UFCS with isFile on a DirEntry with DMD v0.270.0

To reproduce:

    $ cat test.d
    void main() {
        import std.file, std.algorithm;
        dirEntries("/tmp/", SpanMode.breadth).filter!(f => isFile(f));
    }

    $ dmd test.d
    /usr/include/dlang/dmd/std/file.d(1743): Error: name.isFile isn't a
template
    test.d(7): Error: template instance std.file.isFile!(DirEntry) error
instantiating
    /usr/include/dlang/dmd/std/algorithm/iteration.d(985):        instantiated
from here: __lambda2!(DirEntry)
    /usr/include/dlang/dmd/std/algorithm/iteration.d(944):        instantiated
from here: FilterResult!(__lambda2, DirIterator)
    test.d(7):        instantiated from here: filter!(DirIterator)


It is easy to circumvent though:

    $ cat test2.d
    void main() {
        import std.file, std.algorithm;
        dirEntries("/tmp/", SpanMode.breadth).filter!(f => f.isFile);
    }
    $ dmd test.d
    <no output, ok>

--