Skip to content

Commit e022ec0

Browse files
committed
fix
1 parent 3b75dfc commit e022ec0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

script/core/diagnostics/count-down-loop.lua

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ return function (uri, callback)
1717
if maxNumer ~= 1 then
1818
return
1919
end
20+
local minNumber = source.loc and source.loc.value and source.loc.value.type == 'number' and tonumber(source.loc.value[1])
21+
if minNumber and minNumber <= 1 then
22+
return
23+
end
2024
if not source.step then
2125
callback {
2226
start = source.loc.value.start,

test/diagnostics/init.lua

+6
Original file line numberDiff line numberDiff line change
@@ -993,3 +993,9 @@ for i = <!10, 1, 5!> do
993993
print(i)
994994
end
995995
]]
996+
997+
TEST [[
998+
for i = 1, 1 do
999+
print(i)
1000+
end
1001+
]]

0 commit comments

Comments
 (0)