Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type name for prototype rbi #1386

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Fix type name for prototype rbi #1386

merged 2 commits into from
Aug 14, 2023

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Jul 26, 2023

This PR solves two problems.

Fix untyped in case of COLON3

class Test
  sig { returns(Foo) }
  def m1; end

  sig { returns(::Foo) }
  def m2; end
end
class Test
  def m1: () -> Foo

  # before
  def m2: () -> untyped

  # after
  def m2: () -> ::Foo
end

Fixed a problem where namespace disappears when an absolute path is specified

class Test
  sig { returns(Foo::Bar) }
  def m3; end

  sig { returns(::Foo::Bar) }
  def m4; end
end
class Test
  def m3: () -> Foo::Bar

  # before
  def m4: () -> ::Bar

  # after
  def m4: () -> ::Foo::Bar
end

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro soutaro added this to the RBS 3.2 milestone Aug 14, 2023
@soutaro soutaro added this pull request to the merge queue Aug 14, 2023
Merged via the queue into ruby:master with commit 3311bd3 Aug 14, 2023
@ksss ksss deleted the prototype-rbi branch August 14, 2023 07:02
@soutaro soutaro added the Released PRs already included in the released version label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released PRs already included in the released version
Development

Successfully merging this pull request may close these issues.

2 participants