Skip to content

EmmyLua class inheritance #188

@Ketho

Description

@Ketho

I'm trying to use class inheritance as described in the EmmyLua doc but can't get it to work.
Here the Button:RegisterEvent() method does not get inherited from Frame.

---@class Frame
local Frame = {}

---@param event string
function Frame:RegisterEvent(event) end


---@class Button : Frame
local Button = {}

---@return boolean enabled
function Button:IsEnabled() end


---@type Button
local someBtn = {}

image

Similar examples:

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions