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
Inspection Details | |
---|---|
Available in: | Qodana for Ruby 2023.3, RubyMine 2023.3 |
Plugin: | Ruby, 233.SNAPSHOT |
Last modified: 13 July 2023