Make sure the class is not abstract

When I change the signature of a virtual method, it happens quite often that inheriting classes become abstract. This can lead to error messages (apparently large), apparently completely unrelated (to the initial change) to the location. Somewhere in these posts I read "Foo is abstract". But parsing these error messages is tedious. Is there a way to ensure that the class is not abstract?

+4
source share
1 answer

You can use the overridespecifier to indicate that the method in the derived class overrides the abstract method in the base class. When you change the method signature in the base class, the specified method overrideshould cause an explicit compiler error, because it no longer overrides the base class method.

+8
source

Source: https://habr.com/ru/post/1675252/


All Articles