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?
Annotations
Expected Behaviour
The following should work without errors:
---@class Unit
---@field mode "async" | "sync"
and:
---@type Unit
local test = {}
test.mode = (hint) --> "async" or "sync"
Actual Behaviour
The follow shows an error
---@class Unit
---@field mode "async" (error here: <type name> expected.) | "sync"
and:
---@type Unit
local test = {}
test.mode = (hint) --> "sync"
Reproduction steps
- Copy and paste the expected behavior codeblock.
Additional Notes
Only happens with async as far as I can see.
Log File
No response
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?
Annotations
Expected Behaviour
The following should work without errors:
and:
Actual Behaviour
The follow shows an error
and:
Reproduction steps
Additional Notes
Only happens with
asyncas far as I can see.Log File
No response