summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
Diffstat (limited to 'test/type_inference')
-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
+]]