From 80a8ffb500e4e4cebf21891698e682df8f4bd1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 1 Jul 2021 22:21:26 +0800 Subject: fix sometimes `type() ==` does not work --- test/completion/init.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/completion/init.lua') diff --git a/test/completion/init.lua b/test/completion/init.lua index 91c66237..d55d1c9a 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2539,3 +2539,31 @@ local b = tdirect -- type . here, shows "world" local c = tarray[1].$ -- type . here, no auto completion ]] (EXISTS) + +TEST [[ +local function f() + if type() == '$' then + end +end +]] +(EXISTS) + +--config.set('Lua.completion.callSnippet', 'Disable') +-- +--TEST [[ +--GGG = 1 +--GGG = function () +--end +-- +--GGG$ +--]] +--{ +-- { +-- label = 'GGG = 1', +-- kind = define.CompletionItemKind.Variable, +-- }, +-- { +-- label = 'GGG()', +-- kind = define.CompletionItemKind.Function, +-- }, +--} -- cgit v1.2.3