[Issue 5393] New: opDispatch with template this parameter fails to compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 31 05:54:07 PST 2010


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

           Summary: opDispatch with template this parameter fails to
                    compile
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: doob at me.com


--- Comment #0 from Jacob Carlborg <doob at me.com> 2010-12-31 05:51:59 PST ---
When compiling the following code:

class A
{
    void opDispatch (string name, this T) () { }
}

class B : A {}

void main ()
{
    auto b = new B;
    b.foobar();
}

I get this error:

Error: template instance opDispatch!("foobar") does not match template
declaration opDispatch(string name,this T)

DMD v2.051

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