interface function overloading

%u e at ee.com
Sat Jan 8 22:01:11 PST 2011


Isn't it possible to have a hierarchy in interface definitions such that it is
possible to overload according to best interface match?

This now won't compile due to multiple matches.

----
module main;

interface I1{}
interface I2 : I1{}

class C : I2{
  this(){}
}

void func(I1 i){}
void func(I2 i){}

void main(){
  func(new C());
}
----


More information about the Digitalmars-d-learn mailing list