Skip to content

cannot recognize emmy field #1971

Open
Open
@darjun

Description

@darjun

I have defined an emmy class role:

---@class role
---@field equipment_mgr equipment_mgr

an emmy class equipment_mgr:

---@class equipment_mgr
local data = {
        role = role, ---@type role
        equipment = orm_equipment, ---@type table<integer, db.Equipment>
}

then add some method to equipment_mgr:

---@type equipment_mgr
local mt = {}
mt.__index = mt

---@return db.Equipment
function mt:get_equipment(uid)
    return self.equipment[uid]
end

Lua Diagnostics cannot recognize the method get_equipment:
image

while other extension can

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)questionUser has a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions