Skip to content
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

Missing warning when calling a static function with mismatching first argument #1922

Closed
sewbacca opened this issue Feb 17, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@sewbacca
Copy link
Contributor

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

Expected Behaviour

Getting a warning that the first argument (self) is not a string.

Actual Behaviour

No warning

Reproduction steps

---@class Class
local Class = {}

---@param source string
function Class.staticCreator(source)

end

Class.staticCreator(true)
Class:staticCreator() -- Expecting a waring

Additional Notes

grafik

Log File

No response

@sumneko sumneko added the bug Something isn't working label Mar 3, 2023
@sumneko sumneko closed this as completed in c6820ed Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants