summaryrefslogtreecommitdiff
path: root/test-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-26 20:01:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-26 20:01:34 +0800
commit0b708180509007bfb6c54d8112f85d5f85ec9210 (patch)
tree75bc64987a806becaea9bcebeb6227d8b30e944c /test-beta
parentf373707516e5edf9b7a35a8cb5a5e66b7bd63da6 (diff)
downloadlua-language-server-0b708180509007bfb6c54d8112f85d5f85ec9210.zip
array 类
Diffstat (limited to 'test-beta')
-rw-r--r--test-beta/hover/init.lua70
1 files changed, 32 insertions, 38 deletions
diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua
index c4f6cb92..8845c414 100644
--- a/test-beta/hover/init.lua
+++ b/test-beta/hover/init.lua
@@ -1041,25 +1041,20 @@ f(1, 2, 3)
local t: Class[]
]]
-do return end
TEST [[
---@type string[]
local <?x?>
]]
[[
-local x: {
- [*integer]: string,
-}
+local x: string[]
]]
TEST [[
----@type (string|boolean)[]
+---@type string[]|boolean
local <?x?>
]]
[[
-local x: {
- [*integer]: string|boolean,
-}
+local x: boolean|string[]
]]
TEST [[
@@ -1071,44 +1066,43 @@ local <?x?> = t[1]
local x: string
]]
-TEST [[
----@type string[]
-local t
-for _, <?x?> in ipairs(t) do
-end
-]]
-[[
-local x: string
-]]
+-- TODO
+--TEST [[
+-----@type string[]
+--local t
+--for _, <?x?> in ipairs(t) do
+--end
+--]]
+--[[
+--local x: string
+--]]
-TEST [[
----@type string[]
-local t
-for _, <?x?> in pairs(t) do
-end
-]]
-[[
-local x: string
-]]
+--TEST [[
+-----@type string[]
+--local t
+--for _, <?x?> in pairs(t) do
+--end
+--]]
+--[[
+--local x: string
+--]]
-TEST [[
----@type string[]
-local t
-for <?k?>, v in pairs(t) do
-end
-]]
-[[
-local k: integer
-]]
+--TEST [[
+-----@type string[]
+--local t
+--for <?k?>, v in pairs(t) do
+--end
+--]]
+--[[
+--local k: integer
+--]]
TEST [[
---@type table<ClassA, ClassB>
local <?x?>
]]
[[
-local x: {
- [*ClassA]: ClassB,
-}
+local x: table<ClassA, ClassB>
]]
TEST [[