Bug 254 – Interfaces with the same function can give 3 different error messages
Status
RESOLVED
Resolution
WONTFIX
Severity
trivial
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-07-16T19:09:00Z
Last change time
2014-02-15T13:21:15Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
jpelcis
Comments
Comment #0 by jpelcis — 2006-07-16T19:09:35Z
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.
Comment #1 by bugzilla — 2006-07-19T01:37:58Z
Since the error messages are still valid, it doesn't matter that they differ.