Ambiguous virtual function

John Chapman johnch_atms at hotmail.com
Thu Dec 6 07:37:12 UTC 2018


I get an "ambiguous virtual function" error when I compile this:

   interface I {
     void fun();
   }

   mixin template F() {
     void fun() {}
   }

   class C : I {
     mixin F;
     mixin F;
   }

But the error doesn't occur with this:

   class C : I {
     mixin F;
     void fun() {}
   }

Is the compiler giving the non-mixed-in function special 
treatment?


More information about the Digitalmars-d-learn mailing list