summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-25 12:57:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-25 12:57:03 +0800
commitd2ecc29a7182c8308de571db97e0a337963b4aae (patch)
tree51e8f8b419c3c6639d3eb7b695289831b471c0ec /script/vm
parenta88964e7b8f272498f0d540e110eb54c64501127 (diff)
downloadlua-language-server-d2ecc29a7182c8308de571db97e0a337963b4aae.zip
fix infer in `for ..`
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index f6e24d8a..db54b6c8 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1230,13 +1230,13 @@ local compilerSwitch = util.switch()
parent = source,
}
source._iterArgs = {{},{}}
- -- iterator
- selectNode(source._iterator, source.exps, 1)
- -- status
- selectNode(source._iterArgs[1], source.exps, 2)
- -- initValue
- selectNode(source._iterArgs[2], source.exps, 3)
end
+ -- iterator
+ selectNode(source._iterator, source.exps, 1)
+ -- status
+ selectNode(source._iterArgs[1], source.exps, 2)
+ -- initValue
+ selectNode(source._iterArgs[2], source.exps, 3)
if source.keys then
for i, loc in ipairs(source.keys) do
local node = getReturn(source._iterator, i, source._iterArgs)