You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have not realized that there is such a way. But honestly, I think this writing is really weird.
I agree, _ENV is a weird concept in Lua. But in this case, I'm trying to capture all the new assignments to _ENV so I know which legacy API the user is requesting.
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?
Diagnostics/Syntax Checking
Expected Behaviour
If I include _ENV as a parameter, the extension should identify _ENV as properly defined. No errors should occur with the below code:
Actual Behaviour
I am getting an error message:
Invalid global (
_ENV
isnil
).Lua Diagnostics.(global-in-nil-env)Reproduction steps
Additional Notes
This can be worked around via adding a "diagnostic disable" or by adding "local _ENV = _ENV" (which are both very ugly hacks).
Log File
No response
The text was updated successfully, but these errors were encountered: