[Issue 5785] New: Lexing or Parsing issue with UFCS

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 25 16:05:24 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5785

           Summary: Lexing or Parsing issue with UFCS
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-03-25 16:01:57 PDT ---
import std.stdio;
import std.file;
import std.path;
int[string] fileExtensions;
void main()
{
    string filename;
    if (!filename.isFile || filename.getExt !in fileExtensions)
    {
    }
}

> test.d(13): template argument expected following !

The way around this is to not use UFCS:
if (!filename.isFile || getExt(filename) !in fileExtensions)

which is a damn shame because UFCS is a great thing to have.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list