# File rbs-1.0.4/lib/rbs/definition.rb, line 219 def apply(args, location)) InvalidTypeApplicationError.check!( type_name: type_name, args: args, params: params, location: location ) subst = Substitution.build(params, args) ancestors.map do |ancestor| case ancestor when Ancestor::Instance if ancestor.args.empty? ancestor else Ancestor::Instance.new( name: ancestor.name, args: ancestor.args.map {|type| type.sub(subst) }, source: ancestor.source ) end when Ancestor::Singleton ancestor end end end