Skip to content

Commit fbaf25e

Browse files
committed
Prohibit self type as a generics default
1 parent 5dfa097 commit fbaf25e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/rbs/cli/validate.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def validate_class_module_definition
165165

166166
if dt = param.default_type
167167
void_type_context_validator(dt, true)
168+
no_self_type_validator(dt)
168169
no_classish_type_validator(dt)
169170
@validator.validate_type(dt, context: nil)
170171
end
@@ -241,6 +242,7 @@ def validate_interface
241242

242243
if dt = param.default_type
243244
void_type_context_validator(dt, true)
245+
no_self_type_validator(dt)
244246
no_classish_type_validator(dt)
245247
@validator.validate_type(dt, context: nil)
246248
end

0 commit comments

Comments
 (0)