[Issue 2252] New: Sequence of super interfaces matters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 29 16:50:35 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2252

           Summary: Sequence of super interfaces matters
           Product: D
           Version: 1.033
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: benoit at tionex.de


import std.stdio;

version=PROBLEM;
interface I1 {
    void foo();
}
interface IConsts {
}
version(PROBLEM){
    interface I2 : IConsts, I1 {
        void bar();
    }
}
else{
    interface I2 : I1, IConsts {
        void bar();
    }
}
class C1 : I1 {
    void foo() { writefln("foo"); }
}
class C2 : C1, I2 {
    void bar() { writefln("bar"); } 
    void bar2() { writefln("bar"); } 
}
void main() { 
        C2 c2 = new C2(); 
        c2.foo(); 
        c2.bar(); 
} 

//-------------------------------------
If version=PROBLEM is set, the error given is:
class t.C2 interface function I1.foo is not implemented


-- 



More information about the Digitalmars-d-bugs mailing list