diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-16 19:59:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-16 19:59:52 +0800 |
commit | c5246d2c0a4150101b97838375df20d97a2f9c56 (patch) | |
tree | 5dcdcc1258dd21d8dd52e238495a06720aae2c4b /test/completion | |
parent | 451d213cc61336e7a6748f4cb7b2d279134462c2 (diff) | |
download | lua-language-server-c5246d2c0a4150101b97838375df20d97a2f9c56.zip |
close #407 improve completion of vararg
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/init.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index 236403da..b42cd15b 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2349,3 +2349,27 @@ f(1, { kind = define.CompletionItemKind.Property, } } + +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, + } +} |