Implicit Interface Deduction

Faux Amis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 13 14:09:47 PST 2015


interface IA {}
interface IB {}
interface IC {}
interface IAB : IA, IB {}
interface IBC : IB, IC {}

class C : IA, IB, IC {}
// Defining C as : IAB, IBC
// is not really scalable ;)

void main()
{
  IAB c = new C(); // This doesn't work.
}
// Any suggestions?


More information about the Digitalmars-d-learn mailing list