Incorrect type argument variance
Reports type arguments used in an inheritance statement (a superclass clause, self-type, or an inclusion call) which have incorrect variances. Type arguments passed to an inheritance statement must match in variance with the declaring type variable.
Example:
module Enumerable[unchecked out A]
end
class Example[in A]
# Contravariant type variable 'A' of class 'Example' used as a covariant argument
include Enumerable[A]
end
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
RbsIncorrectTypeArgumentVariance- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Ruby, 242.22897 |
Last modified: 11 September 2024