Skip to content
Merged
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
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ PLATFORMS
arm64-darwin-22
arm64-darwin-23
x86_64-darwin-23
x86_64-darwin-24
x86_64-linux

DEPENDENCIES
Expand All @@ -90,4 +91,4 @@ DEPENDENCIES
strscan

BUNDLED WITH
2.5.16
2.6.3
3 changes: 2 additions & 1 deletion lib/rbs/inline/writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,11 @@ def translate_member(member, decl, rbs)
comment = RBS::AST::Comment.new(string: member.comments.content(trim: true), location: nil)
end

kind = decl ? :singleton : :instance #: RBS::AST::Members::Alias::kind
rbs << RBS::AST::Members::Alias.new(
new_name: member.new_name,
old_name: member.old_name,
kind: :instance,
kind: kind,
annotations: [],
location: nil,
comment: comment
Expand Down
8 changes: 8 additions & 0 deletions test/rbs/inline/writer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ class Foo

# foo is an alias of bar
alias :foo :bar

class << self
# self.baz is an alias of self.qux
alias baz qux
end
end
RUBY

Expand All @@ -266,6 +271,9 @@ class Foo

# foo is an alias of bar
alias foo bar

# self.baz is an alias of self.qux
alias self.baz self.qux
end
RBS
end
Expand Down