[Issue 9232] New: Parsing error on some templated methods calls

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 28 04:20:20 PST 2012


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

           Summary: Parsing error on some templated methods calls
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dransic at gmail.com


--- Comment #0 from Nicolas Sicard <dransic at gmail.com> 2012-12-28 04:20:19 PST ---
I think this should compile:
---
struct Foo {
    void bar(T)() {}
    void baz() {}
}

void main() {
    Foo foo;
    (foo).bar!int();   // Error: found '!' when expecting ';' following
statement
    ((foo)).bar!int(); // OK
    foo.bar!int();     // OK
    (foo).baz();       // OK
}
---
(DMD 2.060 MacOSX)

-- 
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