Inspectopedia
 
2024.3

Possibly unintended overload of method from superclass

Warning
New
Last modified: 03 December 2024

Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type.

In this case, the method in a subclass will be overloading the method from the superclass instead of overriding it. If it is unintended, it may result in latent bugs.

Example:

Use the option to choose whether the inspection should also report cases where parameter types are not compatible.