File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,8 @@ def visit_method(node)
337337 if node . sigs . any? ( &:is_override )
338338 if node . sigs . any? ( &:allow_incompatible_override )
339339 printl ( "# @override(allow_incompatible: true)" )
340+ elsif node . sigs . any? ( &:allow_incompatible_override_visibility )
341+ printl ( "# @override(allow_incompatible: :visibility)" )
340342 else
341343 printl ( "# @override" )
342344 end
Original file line number Diff line number Diff line change @@ -397,8 +397,11 @@ def foo; end
397397 sig { override(allow_incompatible: true).returns(T.nilable(String)) }
398398 def bar; end
399399
400- T::Sig::WithoutRuntime. sig { abstract .returns(String) }
400+ sig { override(allow_incompatible: :visibility) .returns(T.nilable( String) ) }
401401 def baz; end
402+
403+ T::Sig::WithoutRuntime.sig { abstract.returns(String) }
404+ def qux; end
402405 RBI
403406
404407 # Modifiers are ignored in RBS, but we generate comments for them
@@ -413,9 +416,12 @@ def foo: -> void
413416 # @override(allow_incompatible: true)
414417 def bar: -> String?
415418
419+ # @override(allow_incompatible: :visibility)
420+ def baz: -> String?
421+
416422 # @without_runtime
417423 # @abstract
418- def baz : -> String
424+ def qux : -> String
419425 RBI
420426 end
421427
You can’t perform that action at this time.
0 commit comments