-
-
Notifications
You must be signed in to change notification settings - Fork 369
Open
Labels
feat/genericRelated to generic emulation featureRelated to generic emulation feature
Description
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
Expected Behaviour
Actual Behaviour
Inheritance does not work and the methods of the main class are not visible
And also the problem with the return type
Reproduction steps
---@diagnostic disable: missing-return, unused-local
---@class LinQ<T>: { [integer]: T }, tablelib -- ["where"]: fun(t: T[], query: fun(a: T): boolean): LinQ<T>
local linq = {};
---@generic T
---@param t T[]
---@param query fun(a: T): boolean
---@return LinQ<T>
function linq.where(t, query) end
---@generic T
---@param t T[]
---@param query fun(a: T): boolean
---@return T?
function linq.first(t, query) end
---@type LinQ<string>
local tab = {};
tab:where(function (a) return a == "" end)
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
feat/genericRelated to generic emulation featureRelated to generic emulation feature