Closed
Description
When addressing ruby/prism#1767, I noticed that all of the type annotations associated with attr_reader
were being lost. I believe we may be incorrectly merging type signatures for attributes.
Example:
# my_gem/rbi/some_file.rbi
class Foo
sig { returns(Integer) }
attr_reader :bar
end
When Tapioca generates the resulting RBI for my_gem
, it should include the signature
# sorbet/rbi/gems/my_gem@0.1.0.rbi
class Foo
sig { returns(Integer) } # this is missing
def bar; end
end