Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class generics cannot inherit directly from the generic #2645

Open
SReject opened this issue Apr 29, 2024 · 1 comment
Open

Class generics cannot inherit directly from the generic #2645

SReject opened this issue Apr 29, 2024 · 1 comment

Comments

@SReject
Copy link

SReject commented Apr 29, 2024

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?

Annotations, Type Checking

Expected Behaviour

When defining a generic class, the class should be able to inherit directly from the generic, allowing an extension of the generic

---@class Example<T>: T
---@field thing boolean

Actual Behaviour

Lua diagnostics reports "undefined class `T`"

Reproduction steps

Copy the following into VSCode

---@class Example<T>: T

Hover over the second T

Additional Notes

No response

Log File

No response

@CppCXY
Copy link
Contributor

CppCXY commented Apr 30, 2024

luals doesn't support generic classes yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants