-
-
Notifications
You must be signed in to change notification settings - Fork 418
Add support for overriding functions #2158
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
The language server currently doesn't automatically infer types when overriding functions.
Example of the desired behavior:
---@class
FooClass = {
---@return FooClass
new = function()
-- create an instance of FooClass
end
---@param foo number
---@param bar string
foo_callback = function(self, foo, bar) end
}
test = FooClass.new()
-- automatically infer types from FooClass:foo_callback
function test:foo_callback(foo, bar)
-- foo is of type number
-- bar is of type string
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request