-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
Globals set with rawset
are always parsed as a table
#2863
Comments
Root cause analysisAfter some debugging, I found that the lua-language-server/script/vm/compiler.lua Lines 1869 to 1879 in 1831e60
Proposed solutionI just tried to skip the logic if it is a : case 'call'
: call(function (source)
-- ignore rawset
if source.node.special == 'rawset' then
return
end
I believe this is the solution to this issue. I will try to open a PR for this, along with the proposed changes in #2862 (comment) to resolve these 2 issues together later 😄 |
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, Type Checking
Expected Behaviour
I expect
x
to be parsed as an integer:Actual Behaviour
x
is parsed asinteger|table
instead.Reproduction steps
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: