镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Recursive expansion on hover of generic type #1853

Closed

Description

@eigenbom

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Hover

Expected Behaviour

.

Actual Behaviour

In the following code:

---@class store<T>: {set:fun(self:store<T>, key:integer, value:T), get:fun(self:store<T>, key:integer):T}

local string_store ---@type store<string>

When you hover string_store the type recursively expands leading to a confusing hover hint:

local string_store: store<string>|{ set: fun(self: store<<T>>|{ set: fun(self: store<<T>>|{ set: unknown, get: fun(self: store<<T>>|{ set: fun(self: store<<T>>|{ set: unknown, get: unknown }, key: int...(too long)...):string }

Reproduction steps

.

Additional Notes

No response

Log File

No response

Activity

  1. eigenbom commented on Jan 25, 2023

    @eigenbom
    Author

    This bug also seems to affect auto-complete, as in this example the "clear" suggestion isn't appearing...

    image

  2. added a commit that references this issue on Jan 11, 2026
    c4ce6f9
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/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