Closed
Description
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?
Other
Expected Behaviour
when using love.keyboard.isDown("f4") or love.keyboard.isDown("f5") it shouldn't show a warning since those are valid KeyConstants in löve2d
Actual Behaviour
love.keyboard.isDown("f4") does not show a warning , but love.keyboard.isDown("f5") does show:
Cannot assign string
to parameter "!"|"#"|"$"|"&"|"'"...(+139)
.
string
cannot match"!"|"#"|"$"|"&"|"'"...(+139)
string
cannot match any subtypes in"!"|"#"|"$"|"&"|"'"...(+139)
- Literal
"f5"
cannot match string"f2"
- Literal
"f5"
cannot match string"f1"
- Literal
"f5"
cannot match string"delete"
- Literal
"f5"
cannot match string"return"
- Literal
"f5"
cannot match string"clear"
- Literal
"f5"
cannot match string"tab"
- Literal
"f5"
cannot match string"backspace"
- Literal
"f5"
cannot match string"insert"
- Literal
"f5"
cannot match string"pagedown"
- Literal
"f5"
cannot match string"pageup"
...(+84) - Literal
"f5"
cannot match string"c"
- Literal
"f5"
cannot match string"b"
- Literal
"f5"
cannot match string"a"
Reproduction steps
.
Additional Notes
whilst it shows a warning when using some KeyKonstants, it is autocompleting for all of them.
It appears to show the error only for KeyConstants that are defined after "f4" is in "keyboard.lua".
Log File
No response
Metadata
Metadata
Assignees
Labels
No labels