From 7dc490d3e62ce6881a9e3e59bddaa362bb2082f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 16 Jan 2023 19:31:06 +0800 Subject: fix #1824 --- test/completion/common.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'test') 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, + }, +} -- cgit v1.2.3