lib/rbs/environment.rb in rbs-3.2.0 vs lib/rbs/environment.rb in rbs-3.2.1

- old
+ new

@@ -274,21 +274,24 @@ def constant_entry(type_name) class_entry(type_name) || module_entry(type_name) || constant_decls[type_name] end def normalize_type_name?(name) - if name.class? - normalize_module_name?(name) - else + return normalize_module_name?(name) if name.class? + + type_name = unless name.namespace.empty? parent = name.namespace.to_type_name parent = normalize_module_name?(parent) return parent unless parent TypeName.new(namespace: parent.to_namespace, name: name.name) else name end + + if type_name?(type_name) + type_name end end def normalize_type_name!(name) result = normalize_type_name?(name)