lib/rbs/definition_builder.rb in rbs-2.2.2 vs lib/rbs/definition_builder.rb in rbs-2.3.0

- old
+ new

@@ -138,11 +138,11 @@ ensure_namespace!(type_name.namespace, location: entry.decls[0].decl.location) case entry when Environment::ClassEntry, Environment::ModuleEntry ancestors = ancestor_builder.instance_ancestors(type_name) - args = Types::Variable.build(entry.type_params.each.map(&:name)) + args = entry.type_params.map {|param| Types::Variable.new(name: param.name, location: param.location) } self_type = Types::ClassInstance.new(name: type_name, args: args, location: nil) Definition.new(type_name: type_name, entry: entry, self_type: self_type, ancestors: ancestors).tap do |definition| one_ancestors = ancestor_builder.one_instance_ancestors(type_name) methods = method_builder.build_instance(type_name) @@ -423,10 +423,10 @@ method_type = method_type.update( type: method_type.type.with_return_type( Types::ClassInstance.new( name: type_name, - args: Types::Variable.build(entry.type_params.each.map(&:name)), + args: entry.type_params.map {|param| Types::Variable.new(name: param.name, location: param.location) }, location: nil ) ) )