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

Rename Symbol does not update Ruby symbol literal visibility modifiers #7842

Open
jez opened this issue Apr 18, 2024 · 0 comments
Open

Rename Symbol does not update Ruby symbol literal visibility modifiers #7842

jez opened this issue Apr 18, 2024 · 0 comments
Labels
enhancement New feature or surprising current feature IDE Relating to Sorbet's LSP server or VS Code extension

Comments

@jez
Copy link
Collaborator

jez commented Apr 18, 2024

Input

→ View on sorbet.run

# typed: true

class A
  def foo; end
  private :foo

  def example
    foo
  end
end

Observed output

No errors! Great job.

If you use Rename Symbol on foo in the def example or the def foo, you'll be able to rename foo to bar. But the rename will only rename the method def and the call site. It won't rename the private :foo to private :bar.

Expected behavior

It would be nice if Rename Symbol was aware that visibility modifiers will need to be updated too.


@jez jez added enhancement New feature or surprising current feature IDE Relating to Sorbet's LSP server or VS Code extension labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or surprising current feature IDE Relating to Sorbet's LSP server or VS Code extension
Projects
None yet
Development

No branches or pull requests

1 participant