Skip to content

Commit 114cb74

Browse files
committed
整理代码
1 parent 61f48f4 commit 114cb74

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

script/core/diagnostics/duplicate-doc-field.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ local function getFieldEventName(doc)
1515
if docFunc.type ~= 'doc.type.function' then
1616
return nil
1717
end
18-
for i = 1, 2 do
18+
for i = 1, #docFunc.args do
1919
local arg = docFunc.args[i]
2020
if arg
2121
and arg.extends

script/core/signature.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ local function isEventNotMatch(call, src)
9494
return false
9595
end
9696
local literal, index
97-
for i = 1, 2 do
98-
if not call.args[i] then
99-
break
100-
end
97+
for i = 1, #call.args do
10198
literal = guide.getLiteral(call.args[i])
10299
if literal then
103100
index = i

script/vm/compiler.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ local function compileCallArgNode(arg, call, callNode, fixIndex, myIndex)
873873
---@type integer?, table<any, boolean>?
874874
local eventIndex, eventMap
875875
if call.args then
876-
for i = 1, 2 do
876+
for i = 1, 10 do
877877
local eventArg = call.args[i + fixIndex]
878878
if not eventArg then
879879
break

0 commit comments

Comments
 (0)