Skip to content

Generic class methods don't show up #2196

Closed
@Frityet

Description

@Frityet

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

MacOS

What is the issue affecting?

Annotations, Type Checking, Diagnostics/Syntax Checking

Expected Behaviour

---@class lanes.Lane<T> : { [integer] : T }
---@field status lanes.Lane.Status
---@field error string?
local Lane = {}

---@generic T
---@param self lanes.Lane<T>
---@param timeout number?
---@return T ...
function Lane:join(timeout) end

---@type lanes.Lane<integer>
local test

local i = test:join()

:join() exists, and i is type integer

Actual Behaviour

Screenshot 2023-07-05 at 16 52 05

Reproduction steps

Use the code above

Additional Notes

No response

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsfeat/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