Skip to content

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

Description

@sewbacca

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions