digitalmars.D.learn - opDispatch + Template this parameter ?
- Jacob Carlborg (18/18) Dec 30 2010 When I try to compile the following code:
- Simen kjaeraas (4/19) Dec 30 2010 Bug. Stuff it in BugZilla.
When I try to compile 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)
Is this a bug or expected behavior ?
DMD v2.051
--
/Jacob Carlborg
Dec 30 2010
Jacob Carlborg <doob me.com> wrote:
When I try to compile 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)
Is this a bug or expected behavior ?
Bug. Stuff it in BugZilla.
--
Simen
Dec 30 2010








"Simen kjaeraas" <simen.kjaras gmail.com>