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: nob...@puremagic.com
          Reporter: christian.koest...@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()"?

--

Reply via email to