diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-16 19:48:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-16 19:48:09 +0800 |
commit | 451d213cc61336e7a6748f4cb7b2d279134462c2 (patch) | |
tree | d6eb922c0ff356d9deef627cd82cfbb4843e08d2 /test | |
parent | f09aca72ff61f2ec997a6be57a3204865dfd1f6e (diff) | |
download | lua-language-server-451d213cc61336e7a6748f4cb7b2d279134462c2.zip |
search across vararg
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/init.lua | 24 | ||||
-rw-r--r-- | test/definition/luadoc.lua | 5 |
2 files changed, 29 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index b8c988f9..236403da 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2325,3 +2325,27 @@ elseif kind = define.CompletionItemKind.Keyword, }, } + +TEST [[ +---@class C +---@field x number +---@field y number + +---@vararg C +local function f(x, ...) +end + +f(1, { + $ +}) +]] +{ + { + label = 'x', + kind = define.CompletionItemKind.Property, + }, + { + label = 'y', + kind = define.CompletionItemKind.Property, + } +} diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index 314af605..ff54546b 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -92,6 +92,11 @@ function t(<?<!f!>?>) end ]] TEST [[ +---@vararg <!fun():void!> +function f(<?...?>) end +]] + +TEST [[ ---@overload fun(y: boolean) ---@param x number ---@param y boolean |