[Issue 18551] New: Improve hint for "does not override any function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 3 03:09:57 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18551
Issue ID: 18551
Summary: Improve hint for "does not override any function
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: christian.koestlin at gmail.com
https://run.dlang.io/is/TKIgPU
class A {
void test() {}
}
class B : A {
override int test() {}
}
the errormessage sound strange (although the message is correct).
It would be helpful, if the hint would show both complete method signatures to
make the mistake more obvious.
Another example could be
class A {
void test() {}
}
class B : A {
override void test() nothrow {}
}
again, the error message is correct, but could be more helpful.
e.g.
onlineapp.d(6): Error: function "void onlineapp.B.test() nothrow" does not
override any function, did you mean to override
"void onlineapp.A.test()"?
--
More information about the Digitalmars-d-bugs
mailing list