-
-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Description
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
Enum members can contain # character
Actual Behaviour
The LSP diagnostic reports an error on using it
Reproduction steps
- Create an enum alias with members containing
#
Given the following alias
---| "/vfx#impact_fx_creator"
---| "/sfx"
---| "/player#player_upgrader"
---| "/cauli"
---| "/game_over_ui"
---| "/in_game_ui"
- Notice that the type check considers the right-hand of
#as a comment even though it's in the string
---@type component_url
local d = "/vfx#impact_fx_creator"- See error
Diagnostics:
1. Cannot assign `string` to parameter `"/cauli"|"/game_over_ui"|"/in_game_ui"|"/player#"|"/sfx"...(+1)`.
- `string` cannot match `"/cauli"|"/game_over_ui"|"/in_game_ui"|"/player#"|"/sfx"...(+1)`
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
No labels