www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13056] New: [2.066.0-b1] Regression: Error: template

https://issues.dlang.org/show_bug.cgi?id=13056

          Issue ID: 13056
           Summary: [2.066.0-b1] Regression: Error: template
                    std.path.baseName cannot deduce function from argument
                    types !()(DirEntry)
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: edwards.ac gmail.com

The following compiles on DMD 2.065.0 but not in 2.066.0-b1:


regress.d:

````d
import std.file;
import std.path;
import std.string;
import std.stdio;

void main()
{
    foreach(de; dirEntries(".", SpanMode.depth))
    {
        writeln(de.baseName);
    }
}
````


Output:

regress.d(10): Error: template std.path.baseName cannot deduce function from
argument types !()(DirEntry), candidates are:

/usr/share/dmd/src/phobos/std/path.d(287):        std.path.baseName(R)(R path)
if (isRandomAccessRange!R && hasSlicing!R && isSomeChar!(ElementType!R) ||
isSomeString!R)

/usr/share/dmd/src/phobos/std/path.d(311):       
std.path.baseName(CaseSensitive cs = CaseSensitive.osDefault, C, C1)(inout(C)[]
path, in C1[] suffix) if (isSomeChar!C && isSomeChar!C1)

--
Jul 06 2014