lib/rbs/variance_calculator.rb in rbs-0.20.1 vs lib/rbs/variance_calculator.rb in rbs-1.0.0.pre

- old
+ new

@@ -84,10 +84,14 @@ result end def in_inherit(name:, args:, variables:) - type = Types::ClassInstance.new(name: name, args: args, location: nil) + type = if name.class? + Types::ClassInstance.new(name: name, args: args, location: nil) + else + Types::Interface.new(name: name, args: args, location: nil) + end Result.new(variables: variables).tap do |result| type(type, result: result, context: :covariant) end end