We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Visual Studio Code Extension (sumneko.lua)
Linux
Type Checking
---@enum EnumAB local e = { A = 0, B = 1, } ---@type EnumAB local a = 1 ---@type EnumAB.A local ea = e.A ---@type EnumAB.B local eb = e.B ---@type EnumAB.B local eb = e.A -- Cannot assign `EnumAB.A` to `EnumAB.B` ---@type EnumAB local ee = eb ---@type EnumAB.A local eea = ee -- Cannot assign `EnumAB` to `EnumAB.A`
---@enum EnumAB local e = { A = 0, B = 1, } ---@type EnumAB local a = 1 ---@type EnumAB.A local ea = e.A -- Cannot assign `integer` to `EnumAB.A` ---@type EnumAB.B local eb = e.B -- Cannot assign `integer` to `EnumAB.B` ---@type EnumAB.B local eb = e.A -- Cannot assign `EnumAB.A` to `EnumAB.B` ---@type EnumAB local ee = eb -- Cannot assign `EnumAB.B` to `EnumAB`. ---@type EnumAB.A local eea = ee -- Cannot assign `EnumAB` to `EnumAB.A`
EnumAB.A is most likely an unintended side effect, but having restrictions inside the enum seems like a good idea
EnumAB.A
No response
The text was updated successfully, but these errors were encountered:
exactly my thoughts :| its not as useful if you can just make a typo / change values and not be warned about it
Sorry, something went wrong.
No branches or pull requests
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Type Checking
Expected Behaviour
Actual Behaviour
Reproduction steps
Additional Notes
EnumAB.A
is most likely an unintended side effect, but having restrictions inside the enum seems like a good ideaLog File
No response
The text was updated successfully, but these errors were encountered: