[Issue 254] New: Interfaces with the same function can give 3 different error messages

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 16 17:09:37 PDT 2006


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

           Summary: Interfaces with the same function can give 3 different
                    error messages
           Product: D
           Version: 0.162
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: trivial
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: jpelcis at gmail.com


This part remains the same.

------------------------------------

interface foo {
        void blah ();
}

interface bar {
        int blah ();
}

------------------------------------

class blah : foo, bar {
        int blah () {}
}

test.d(10): function test.blah.blah of type int() overrides but is not
covariant
 with test.foo.blah of type void()

------------------------------------

class blah : bar, foo {
        int blah () {}
}

test.d(10): function test.blah.blah expected to return a value of type int

------------------------------------

class blah : foo, bar {
        void blah () {}
}

test.d(9): class test.blah interface function bar.blah isn't implemented

------------------------------------

All of the error messages are technically correct, but only one of them should
be returned.


-- 




More information about the Digitalmars-d-bugs mailing list