summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-16 19:59:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-16 19:59:52 +0800
commitc5246d2c0a4150101b97838375df20d97a2f9c56 (patch)
tree5dcdcc1258dd21d8dd52e238495a06720aae2c4b /test/completion
parent451d213cc61336e7a6748f4cb7b2d279134462c2 (diff)
downloadlua-language-server-c5246d2c0a4150101b97838375df20d97a2f9c56.zip
close #407 improve completion of vararg
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/init.lua24
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,
+ }
+}