Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/tapioca/gemfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ def exported_rbi_tree

exported_rbi_files.each do |file|
rbi = RBI::Parser.parse_file(file)
# Merging drops standalone `private`/`protected` nodes, so move their visibility onto each method first
rbi.flatten_visibilities!
rewriter.merge(rbi)
end

Expand Down
8 changes: 8 additions & 0 deletions spec/tapioca/cli/gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ def self.foo(a = T.unsafe(nil), b: T.unsafe(nil), **opts); end
write!("rbi/foo/bar.rbi", <<~RBI)
module Foo
def foo; end

private

def baz; end
end
RBI

Expand Down Expand Up @@ -362,6 +366,10 @@ def bar; end
module Foo
def foo; end

private

def baz; end

class << self
sig { params(a: String, b: Integer, opts: T.untyped).void }
def foo(a = T.unsafe(nil), b: T.unsafe(nil), **opts); end
Expand Down
Loading