Skip to content

cannot recognize emmy field #1971

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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