Is this bug or not?

Mariusz Gliwiński alienballance at gmail.com
Fri May 6 00:39:31 PDT 2011


Is this bug, or is it as supposed to be? I'm not sure...
<code>
interface TmpI(T) {
     void func(T);
}

class TmpC {}
class TmpC2 : TmpC {}

class Tmp : TmpI!TmpC2 {
     void func(TmpI!TmpC) {};
}
void main(string[] args) {
     auto inst = new Tmp;
     inst.func(new Tmp);
}
</code>
Error: function tmp.Tmp.func (TmpI _param_0) is not callable using 
argument types (Tmp)
Error: cannot implicitly convert expression (new Tmp) of type tmp.Tmp to 
tmp.TmpI!(TmpC).TmpI


More information about the Digitalmars-d-learn mailing list