Skip to content

Commit c9d8193

Browse files
committed
fix
1 parent 7c481f5 commit c9d8193

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script/vm/compiler.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ local function compileFunctionParam(func, source)
11001100
-- local call ---@type fun(f: fun(x: number));call(function (x) end) --> x -> number
11011101
local funcNode = vm.compileNode(func)
11021102
for n in funcNode:eachObject() do
1103-
if n.type == 'doc.type.function' then
1103+
if n.type == 'doc.type.function' and n.args[aindex] then
11041104
local argNode = vm.compileNode(n.args[aindex])
11051105
for an in argNode:eachObject() do
11061106
if an.type ~= 'doc.generic.name' then
@@ -1147,7 +1147,7 @@ local function compileFunctionParam(func, source)
11471147
if extClass then
11481148
vm.getClassFields(suri, extClass, key, function (field, isMark)
11491149
for n in vm.compileNode(field):eachObject() do
1150-
if n.type == 'function' then
1150+
if n.type == 'function' and n.args[aindex] then
11511151
local argNode = vm.compileNode(n.args[aindex])
11521152
for an in argNode:eachObject() do
11531153
if an.type ~= 'doc.generic.name' then

0 commit comments

Comments
 (0)