summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/completion/init.lua20
1 files changed, 20 insertions, 0 deletions
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)