lib/rbs/variance_calculator.rb in rbs-0.12.2 vs lib/rbs/variance_calculator.rb in rbs-0.13.0
- old
+ new
@@ -118,10 +118,10 @@
env.interface_decls[type.name].decl.type_params
end
type.args.each.with_index do |ty, i|
var = type_params.params[i]
- case var.variance
+ case var&.variance
when :invariant
type(ty, result: result, context: :invariant)
when :covariant
type(ty, result: result, context: context)
when :contravariant