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
Comment #1 by kennytm — 2011-04-25T14:13:14Z
Probably depends on issue 5886.
Comment #2 by k.hara.pg — 2011-07-26T10:26:22Z
Comment #3 by k.hara.pg — 2012-01-03T04:49:02Z