lib/rbs/environment_walker.rb in rbs-1.7.1 vs lib/rbs/environment_walker.rb in rbs-1.8.0
- old
+ new
@@ -55,11 +55,11 @@
definition.each_type do |type|
each_type_node type, &block
end
end
when name.alias?
- each_type_node builder.expand_alias(name), &block
+ each_type_node builder.expand_alias1(name), &block
else
raise "Unexpected TypeNameNode with type_name=#{name}"
end
when InstanceNode, SingletonNode
@@ -124,9 +124,12 @@
type.args.each do |ty|
each_type_node(ty, &block)
end
when RBS::Types::Alias
yield TypeNameNode.new(type_name: type.name)
+ type.args.each do |ty|
+ each_type_node(ty, &block)
+ end
when RBS::Types::Union, RBS::Types::Intersection, RBS::Types::Tuple
type.types.each do |ty|
each_type_node ty, &block
end
when RBS::Types::Optional