lib/rbs/cli/validate.rb in rbs-3.6.0.pre.2 vs lib/rbs/cli/validate.rb in rbs-3.6.0.pre.3
- old
+ new
@@ -115,14 +115,10 @@
void_type_context_validator(arg, true)
no_self_type_validator(arg)
no_classish_type_validator(arg)
@validator.validate_type(arg, context: nil)
end
-
- if super_entry = @env.normalized_class_entry(super_class.name)
- InvalidTypeApplicationError.check!(type_name: super_class.name, args: super_class.args, params: super_entry.type_params, location: super_class.location)
- end
end
end
when Environment::ModuleEntry
entry.decls.each do |decl|
decl.decl.self_types.each do |self_type|
@@ -169,10 +165,12 @@
no_classish_type_validator(dt)
@validator.validate_type(dt, context: nil)
end
end
+ TypeParamDefaultReferenceError.check!(d.type_params)
+
entry.decls.each do |d|
d.decl.each_member do |member|
case member
when AST::Members::MethodDefinition
@validator.validate_method_definition(member, type_name: name)
@@ -246,10 +244,12 @@
no_classish_type_validator(dt)
@validator.validate_type(dt, context: nil)
end
end
+ TypeParamDefaultReferenceError.check!(decl.decl.type_params)
+
decl.decl.members.each do |member|
case member
when AST::Members::MethodDefinition
@validator.validate_method_definition(member, type_name: name)
member.overloads.each do |ov|
@@ -316,9 +316,11 @@
no_self_type_validator(dt)
no_classish_type_validator(dt)
@validator.validate_type(dt, context: nil)
end
end
+
+ TypeParamDefaultReferenceError.check!(decl.decl.type_params)
no_self_type_validator(decl.decl.type)
no_classish_type_validator(decl.decl.type)
void_type_context_validator(decl.decl.type)
rescue BaseError => error