lib/rbs/definition_builder/ancestor_builder.rb in rbs-2.7.0 vs lib/rbs/definition_builder/ancestor_builder.rb in rbs-2.8.0.pre.1

- old
+ new

@@ -209,10 +209,13 @@ super_name = BuiltinNames::Object.name super_args = [] end NoSuperclassFoundError.check!(super_name, env: env, location: primary.decl.location) + if super_class + InheritModuleError.check!(super_class, env: env) + end ancestors = OneAncestors.class_instance( type_name: type_name, params: params, super_class: Definition::Ancestor::Instance.new(name: super_name, args: super_args, source: :super) @@ -266,9 +269,12 @@ else super_name = BuiltinNames::Object.name end NoSuperclassFoundError.check!(super_name, env: env, location: primary.decl.location) + if super_class + InheritModuleError.check!(super_class, env: env) + end ancestors = OneAncestors.singleton( type_name: type_name, super_class: Definition::Ancestor::Singleton.new(name: super_name) )