summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 0bf9c606..7e4aac61 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -4084,3 +4084,33 @@ local foo
foo = {"<??>"}
]]
(EXISTS)
+
+TEST [[
+---@class c
+---@field abc fun()
+---@field abc2 fun()
+
+---@param p c
+local function f(p) end
+
+f({
+ abc = function(s)
+ local abc3
+ abc<??>
+ end,
+})
+]]
+{
+ {
+ label = 'abc3',
+ kind = define.CompletionItemKind.Variable,
+ },
+ {
+ label = 'abc',
+ kind = define.CompletionItemKind.Text,
+ },
+ {
+ label = 'abc2',
+ kind = define.CompletionItemKind.Text,
+ },
+}