Skip to content

Add support for overriding functions #2158

Description

@evur

The language server currently doesn't automatically infer types when overriding functions.

Example of the desired behavior:

---@classFooClass= {
---@returnFooClassnew=function()
-- create an instance of FooClassend---@paramfoonumber---@parambarstringfoo_callback=function(self, foo, bar) end
}
test=FooClass.new()
-- automatically infer types from FooClass:foo_callbackfunctiontest:foo_callback(foo, bar)
-- foo is of type number-- bar is of type stringend

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions