summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-10 03:12:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-10 03:12:05 +0800
commit4e0a890060aea1eb54b14b3a77cba8fc42ceeebb (patch)
tree0ba13f7a859f2ea850f09774936b15d3fb1d971c /test/type_inference
parent88b155930b1fe6a8cf086c55ea3b108c8b1f0e73 (diff)
downloadlua-language-server-4e0a890060aea1eb54b14b3a77cba8fc42ceeebb.zip
supports `---@type (string|integer)[]`
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 4d1cfb4a..d199f79b 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1434,3 +1434,8 @@ local t = { 'x' }
local <?x?> = t[#t]
]]
+
+TEST '(string|integer)[]' [[
+---@type (string|integer)[]
+local <?x?>
+]]