From b6a58d0912d6cb015c621d2ce32d701ef6e7500e 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, 24 Jun 2021 22:16:17 +0800 Subject: stash --- test/completion/init.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/completion/init.lua b/test/completion/init.lua index 80a4aae5..4a04ecc5 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2519,3 +2519,23 @@ zzzz$ insertText = 'zzzz(${1:a: any}, ${2:b: any})', }, } +Cared['insertText'] = false + +TEST [[ +--- @diagnostic disable: unused-local +--- @class Test2 +--- @field world integer +local Test2 = {} + +--- @type Test2 +local tdirect +--- @type Test2[] +local tarray + +-- Direct inference +local b = tdirect -- type . here, shows "world" + +-- Inferred by index +local c = tarray[1].$ -- type . here, no auto completion +]] +(EXISTS) -- cgit v1.2.3