summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-16 19:31:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-16 19:31:06 +0800
commit7dc490d3e62ce6881a9e3e59bddaa362bb2082f1 (patch)
tree4d3cd310c72da4a80615b48047b44ab8e40a60a2 /test/completion
parent7f3ed1f3b74c0b651ce2aae6a8a345c069db5d06 (diff)
downloadlua-language-server-7dc490d3e62ce6881a9e3e59bddaa362bb2082f1.zip
fix #1824
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,
+ },
+}