[Issue 3381] New: [tdpl] Incorrect assessment of overriding in triangular-shaped hierarchy

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 8 20:36:17 PDT 2009


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

           Summary: [tdpl] Incorrect assessment of overriding in
                    triangular-shaped hierarchy
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrei at metalanguage.com


--- Comment #0 from Andrei Alexandrescu <andrei at metalanguage.com> 2009-10-08 20:36:16 PDT ---
This code doesn't compile:

interface VisualElement {
   void draw();
}

interface Actor {
}

interface VisualActor : Actor, VisualElement {
}

class Sprite3 : Actor, VisualActor {
    override void draw() { }
}

The error message is:

Error: function test.Sprite3.draw does not override any function

If I comment out the implementation of draw I get:

Error: class test.Sprite3 interface function VisualElement.draw isn't
implemented

Of course, both of these can't be true at the same time :o). The original
program should compile and run properly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list