File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -887,7 +887,7 @@ local function compileLocal(source)
887887
888888 -- for x = ... do
889889 if source .parent .type == ' loop' then
890- vm .setNode (source , globalMgr . getGlobal ( ' type ' , ' integer ' ) )
890+ vm .compileNode (source . parent )
891891 end
892892
893893 if source .bindDocs then
@@ -1246,6 +1246,12 @@ local compilerSwitch = util.switch()
12461246 end
12471247 end
12481248 end )
1249+ : case ' loop'
1250+ : call (function (source )
1251+ if source .loc then
1252+ vm .setNode (source .loc , globalMgr .getGlobal (' type' , ' integer' ))
1253+ end
1254+ end )
12491255 : case ' doc.type'
12501256 : call (function (source )
12511257 for _ , typeUnit in ipairs (source .types ) do
Original file line number Diff line number Diff line change @@ -2121,3 +2121,9 @@ local x
21212121---@type integer
21222122<?x?> = XXX
21232123]]
2124+
2125+ TEST ' unknown' [[
2126+ for _ = 1, 999 do
2127+ local <?x?>
2128+ end
2129+ ]]
You can’t perform that action at this time.
0 commit comments