summaryrefslogtreecommitdiff
path: root/test/definition/luadoc.lua
diff options
context:
space:
mode:
authorLei Zhu <uhziel@gmail.com>2021-01-04 14:59:10 +0800
committerLei Zhu <uhziel@gmail.com>2021-01-04 14:59:10 +0800
commitc57556e25cb02e01011272c305854d0f1c106e1c (patch)
tree1da8fed1f65abe4d44042c33fcd5eb22b5d99838 /test/definition/luadoc.lua
parent573db3376fa2972cb7d9af0fa560d4e0395ce191 (diff)
downloadlua-language-server-c57556e25cb02e01011272c305854d0f1c106e1c.zip
添加table< table<>>这种嵌套table的测试用例
Diffstat (limited to 'test/definition/luadoc.lua')
-rw-r--r--test/definition/luadoc.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index 3a6ff15d..210f5a26 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -317,3 +317,16 @@ for k, v in pairs(v1) do
print(v.bar1)
end
]]
+
+TEST [[
+---@class Foo
+local Foo = {}
+function Foo:<!bar1!>() end
+
+---@type table<number, table<number, Foo>>
+local v1
+for i, v in ipairs(v1) do
+ local v2 = v[1]
+ print(v2.<?bar1?>)
+end
+]]