We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
for .. in
1 parent 7d51c01 commit b390ad6Copy full SHA for b390ad6
script/vm/compiler.lua
@@ -1228,6 +1228,9 @@ local compilerSwitch = util.switch()
1228
for i, loc in ipairs(source.keys) do
1229
local node = getReturn(source._iterator, i, source._iterArgs)
1230
if node then
1231
+ if i == 1 then
1232
+ node:removeOptional()
1233
+ end
1234
vm.setNode(loc, node)
1235
end
1236
test/type_inference/init.lua
@@ -2048,3 +2048,11 @@ end
2048
2049
print(<?x?>)
2050
]]
2051
+
2052
+TEST 'integer' [[
2053
+---@type fun():integer?
2054
+local iter
2055
2056
+for <?x?> in iter do
2057
+end
2058
+]]
0 commit comments