-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparing against type overrides it #1841
Comments
Not sure if it's relevant but when I try to print a number with My temp fix is changing Complete code snippet
|
I don't think that's related. I can't verify what actually works in love, but both the wiki and the API Documentation specify either a string or a table as the parameter, so the param type mismatch warning is probably correct. |
Just like firas said you can't print out a number parameter when table/string parameters are specified but if you wanna print out a number you can use |
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:
The type of the parameter
v
should beinteger
, and I shouldn't get any warnings about passing an integer value tois_string
.Actual Behaviour
I get a type mismatch at
is_string(3)
:Hovering over
v
inside theis_string
function also shows its type asstring
instead ofinteger
.Reproduction steps
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: