Assume the following:

interface IFace {
  void foo();
  void bar();
}

abstract class A : IFace {
  override void foo() {}
}

class B : A {
  override void bar() {}
}

Now why this fails to compiler with the following message:


--->>>
function bar does not override any function, did you mean to override 'IFace.bar()'?
<<<---


Obviously, I meant that, since the abstract class A implements IFace, and B derives from A.

Do I need to declare IFace's unimplemented methods in A as abstract? If yes, why? Isn't that already obvious enough (any unimplemented virtual function is abstract)?

Reply via email to