[Issue 2252] Sequence of super interfaces matters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 24 06:24:14 PST 2008


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


smjg at iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com
           Keywords|                            |accepts-invalid




------- Comment #3 from smjg at iname.com  2008-11-24 08:24 -------
ISTM the bug is actually that the original code compiles without
version=PROBLEM, rather than that it fails with.

http://www.digitalmars.com/d/1.0/interface.html
"A reimplemented interface must implement all the interface functions, it does
not inherit them from a super class"

C2 reimplements I1, albeit indirectly.  So the code should be

class C2 : C1, I2 {
    void foo() { super.foo(); }
    void bar() { writefln("bar"); } 
    void bar2() { writefln("bar"); } 
}

You could argue that indirect reimplementation should be exempt from this
requirement, but that would be an enhancement request.


-- 



More information about the Digitalmars-d-bugs mailing list