Cause
This error occurs if the signature of a method that is reimplemented by a subclass is not compatible with its superclass.
To be compatible, the following conditions must apply.
Both methods must have the same number of parameters.
Each parameter in the subclass implementation must be of a type that is compatible with the equivalent parameter in the superclass implementation. This means that the type of the subclass parameter must be the same primitive type, the same class, or a subclass of the type of the superclass parameter.
Each parameter in the subclass implementation must have the same or stricter usage than the equivalent parameter in the superclass implementation. The following must therefore apply.
If the superclass parameter is constant, the subclass parameter must also be constant.
If the superclass parameter is input, the subclass parameter can be input or constant.
If the superclass parameter is output, the subclass parameter must also be output.
If the superclass parameter is io, the subclass parameter can have any usage.
Both implementations must have no return type, or their return types must be compatible. To be compatible, the return type of the subclass implementation must be the same primitive type, the same class, or a subclass of the return type of the superclass implementation.
The
Action
Change the signature of the superclass or the subclass implementation of the method so that it complies with these rules.