Skip to content

Generic classes do not include their base class by default #2118

Open
@artemking4

Description

@artemking4
---@class A<T> : { typed_dummy: T }
---@field dummy number

---@type A<number>
local a

local b = a.typed_dummy -- ok
local c = a.dummy -- warning, undefined field
---@class A<T> : { typed_dummy: T }
---@field dummy number

---@type A<number>|A
local a

local b = a.typed_dummy -- ok
local c = a.dummy -- now ok too

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeat/genericRelated to generic emulation feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions