When I change the signature of a virtual method, it happens quite frequently, that inheriting classes become abstract. This might lead to (confusingly large) error messages at apparently completely unrelated (to the original change) locations. Somewhere in these messages, I read "Foo is abstract". But parsing these error messages is tedious. Is there a way to enforce that a class is not abstract?
You can use the override
specifier to specify that a method in the derived class overrides the abstract method in the base class. When you change the signature of the method in the base class, the override
specified method should cause a clear compiler error because because it no longer overrides the base class method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With