-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
bugSomething isn't workingSomething isn't working
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?
Type Checking, Hover
Expected Behaviour
Trying the following minimal example:
---@param v integer
---@return boolean
local function is_string(v)
return type(v) == 'string'
end
print(is_string(3))
The type of the parameter v
should be integer
, and I shouldn't get any warnings about passing an integer value to is_string
.
Actual Behaviour
I get a type mismatch at is_string(3)
:
Hovering over v
inside the is_string
function also shows its type as string
instead of integer
.
Reproduction steps
- Try the code above in vscode with extension version 3.6.7
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working