Skip to content

__call metamethod return type ignored #95

Open
@Avril112113

Description

@Avril112113

This works in Intelij but not with your extension

---@class Test
local Test = {
	someval=404
}
---@return Test
function Test:__call() end
setmetatable(Test, Test)

local t = Test()
-- No completion for the following
t.

As i note it seems that setmetatable might not even be accounted for and that only the fact __call is in the same table makes it work in InteliJ, though i am not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)priority.lowA low priority topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions