summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-05 10:20:19 +0800
committersumneko <sumneko@hotmail.com>2019-05-05 10:20:19 +0800
commit84ea80412cae1c922afc4b9cb74bf5369c04b87a (patch)
treef86d7e416178468bfa565f2a459bb7f9c3b7dfb5 /server/test
parent06079b7dfab3e692ea0d2615ede597b59d07a8ae (diff)
downloadlua-language-server-84ea80412cae1c922afc4b9cb74bf5369c04b87a.zip
补个测试
Diffstat (limited to 'server/test')
-rw-r--r--server/test/hover/init.lua27
1 files changed, 4 insertions, 23 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index 685ee507..1c4809a6 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -703,40 +703,21 @@ local x: {
]]
TEST [[
----@type string[]
-local t
-local <?x?> = t[1]
-]]
-[[
-local x: string
-]]
-
-TEST [[
----@type string[]
-local t
-for _, <?x?> in ipairs(t) do
-end
-]]
-[[
-local x: string
-]]
-
-TEST [[
----@type string[]
+---@type table<ClassA, ClassB>
local t
for _, <?x?> in pairs(t) do
end
]]
[[
-local x: string
+local x: *ClassB
]]
TEST [[
----@type string[]
+---@type table<ClassA, ClassB>
local t
for <?k?>, v in pairs(t) do
end
]]
[[
-local k: integer
+local k: *ClassA
]]