summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
authoractboy168 <actboy168@gmail.com>2020-12-02 20:39:49 +0800
committeractboy168 <actboy168@gmail.com>2020-12-02 20:39:49 +0800
commit9fe22ad2c924bc3f6fb8c73a3301ccfeddf72c9b (patch)
treee304c5ec10eb4f38ffed2a48d6436f0f9fdeeee8 /test/type_inference
parentbf5d9d2159d5eabbd47e262941d46928f67b0b4e (diff)
parent8f5946edf67ab5de910ac1955337f8588be24406 (diff)
downloadlua-language-server-9fe22ad2c924bc3f6fb8c73a3301ccfeddf72c9b.zip
Merge branch 'master' of https://github.com/sumneko/lua-language-server
Diffstat (limited to 'test/type_inference')
-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]
+]]