Skip to content

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

@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

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

    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

        Participants

        @sumneko@artemking4

        Issue actions