We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Visual Studio Code Extension (sumneko.lua)
Windows
Type Checking, Completion, Hover
In the following example:
---@class A_Class local A = { x = 5 } function A:func() for i = 1, self.x do print(i) end self.y = 3 self.y = self.y + 3 end
When hovering over self.x in the for loop or trying to use auto-completion there, I expect to get x as a suggestion with the type integer.
self.x
for
x
integer
It should be exactly the same result as if the self.y = self.y + 3 line is commented out.
self.y = self.y + 3
---@class A_Class local A = { x = 5 } function A:func() for i = 1, self.x do print(i) end self.y = 3 --self.y = self.y + 3 end
The type of self is lost, but only in the for statement. Auto completion doesn't suggest x either.
self
This only happens when the line self.y = self.y + 3 is not removed or commented out. If it is removed, everything works as expected.
No response
Let me know if you need it.
The text was updated successfully, but these errors were encountered:
'self.y = self.y + 3'
If you use this without enough values to go off of it won't work. Try adding more values for it to go along with.
Sorry, something went wrong.
3154cef
No branches or pull requests
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?
Type Checking, Completion, Hover
Expected Behaviour
In the following example:
When hovering over
self.x
in thefor
loop or trying to use auto-completion there, I expect to getx
as a suggestion with the typeinteger
.It should be exactly the same result as if the
self.y = self.y + 3
line is commented out.Actual Behaviour
The type of
self
is lost, but only in thefor
statement. Auto completion doesn't suggestx
either.This only happens when the line
self.y = self.y + 3
is not removed or commented out. If it is removed, everything works as expected.Reproduction steps
Additional Notes
No response
Log File
Let me know if you need it.
The text was updated successfully, but these errors were encountered: