summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-21 17:39:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-21 17:39:41 +0800
commit7699e4ba610e570199f0b8c9097a5cdeda472c40 (patch)
tree3a679f4de0cbca2d847f20f8114acaeb679f1c1c /test
parent2adc24974ffa9b804e9b99a9b8f777a5220f7e89 (diff)
downloadlua-language-server-7699e4ba610e570199f0b8c9097a5cdeda472c40.zip
fix #1335
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 43fb3c62..162841ac 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3737,3 +3737,21 @@ function m:init()
return <?self?>
end
]]
+
+TEST 'string' [[
+---@vararg string
+function F(...)
+ local t = {...}
+ for k, <?v?> in pairs(t) do
+ end
+end
+]]
+
+TEST 'string' [[
+---@vararg string
+function F(...)
+ local t = {...}
+ for k, <?v?> in ipairs(t) do
+ end
+end
+]]