templated function call from interface
rumbu
rumbu at rumbu.ro
Sat Nov 16 00:42:03 PST 2013
interface I
{
void foo(T)(T t);
}
class C: I
{
}
//bug 1: compiler does not complain about the fact that C doesn't
implement foo(), even if C is instantiated somewhere.
void bar(I i)
{
i.foo(2);
}
//bug 2: Error 42: Symbol Undefined
_D4main1I10__T3fooTiZ3fooMFiZv (void main.I.foo!(int).foo(int))
dmd 2.064.2 windows.
I suppose that these two are related.
Are these bugs or it's not possible to have templated functions
in an interface?
More information about the Digitalmars-d-learn
mailing list