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

Renaming a field of a class renames a field with the same name in a different class #1855

Closed
sewbacca opened this issue Jan 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@sewbacca
Copy link
Contributor

sewbacca commented Jan 27, 2023

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Annotations, Completion

Expected Behaviour

Only the field test in class b gets renamed.

Actual Behaviour

Both fields in a and b get renamed.

Reproduction steps

  1. Paste
---@alias lang 'en' | 'de'

---@class A
local a

---@type lang
a.test = 'en'

---@class B
local b

function a.init()
	b.test = a.test
end
  1. Rename b.test
  2. See error

Additional Notes

renaming issue

Log File

No response

@sumneko sumneko added the bug Something isn't working label Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants