[Issue 15658] isFile isn't a template

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Mar 21 18:10:36 PDT 2016


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

b2.temp at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |b2.temp at gmx.com
           Hardware|x86_64                      |All
           Assignee|nobody at puremagic.com        |b2.temp at gmx.com
                 OS|Linux                       |All

--- Comment #1 from b2.temp at gmx.com ---
It's not a UFCS issue:

"dirEntries()" doesn't return a range of string. It returns a range of "struct
DirEntry{}" . This struct itself contains a member function called "isFile()",
which is not a template.

Latter in std.file.isFile() this member is called because in

@property bool isFile(R)(auto ref R name)
    if (isConvertibleToString!R)
{
    return name.isFile!(StringTypeOf!R); 
} 

it's DirEntry.isFile that get called !!

--


More information about the Digitalmars-d-bugs mailing list