diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 05:42:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 05:42:20 +0800 |
commit | b390ad6411478c2cccadd9750b01971052a7e2c4 (patch) | |
tree | 9455c7a4ed3e7b4806a280a15f5e9f4a94deff9b /script | |
parent | 7d51c01c0b9f4ab70d1ee95950d481cbc40f9092 (diff) | |
download | lua-language-server-b390ad6411478c2cccadd9750b01971052a7e2c4.zip |
first local of `for .. in` can not be nil
Diffstat (limited to 'script')
-rw-r--r-- | script/vm/compiler.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 5a30367a..c7d559b5 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1228,6 +1228,9 @@ local compilerSwitch = util.switch() for i, loc in ipairs(source.keys) do local node = getReturn(source._iterator, i, source._iterArgs) if node then + if i == 1 then + node:removeOptional() + end vm.setNode(loc, node) end end |