summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-02 20:11:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-02 20:11:30 +0800
commit830be2cab0d5e45a32606bb33eba216c72a9ca66 (patch)
tree9e400ab0c69e238d5966d9f23918e4353c5ff09e /test
parent5833c2aef04bd4704c86104275411ef330981f85 (diff)
downloadlua-language-server-830be2cab0d5e45a32606bb33eba216c72a9ca66.zip
fully support Doc.type.array
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 40831c07..84462da6 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -329,3 +329,16 @@ local <?x?>
TEST 'table' [[
self.<?t?>[#self.t+1] = {}
]]
+
+TEST 'string' [[
+---@type string[]
+local x
+local <?y?> = x[1]
+]]
+
+TEST 'string' [[
+---@return string[]
+local function f() end
+local x = f()
+local <?y?> = x[1]
+]]