Bug 5393 – opDispatch with template this parameter fails to compile
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-12-31T05:51:00Z
Last change time
2012-01-03T04:49:02Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
doob
Comments
Comment #0 by doob — 2010-12-31T05:51:59Z
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