lib/rbs/definition.rb in rbs-3.6.0.pre.2 vs lib/rbs/definition.rb in rbs-3.6.0.pre.3
- old
+ new
@@ -235,17 +235,11 @@
@type_name = type_name
@params = params
@ancestors = ancestors
end
- def apply(args, location:)
- # Assume default types of type parameters are already added to `args`
- InvalidTypeApplicationError.check!(
- type_name: type_name,
- args: args,
- params: params.map { AST::TypeParam.new(name: _1, variance: :invariant, upper_bound: nil, location: nil, default_type: nil) },
- location: location
- )
+ def apply(args, env:, location:)
+ InvalidTypeApplicationError.check2!(env: env, type_name: type_name, args: args, location: location)
subst = Substitution.build(params, args)
ancestors.map do |ancestor|
case ancestor