From c9d819305b6f88b53de294d54c820681518430c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 6 Sep 2024 17:15:39 +0800 Subject: fix --- script/vm/compiler.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 9632ebbf..041d287e 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1100,7 +1100,7 @@ local function compileFunctionParam(func, source) -- local call ---@type fun(f: fun(x: number));call(function (x) end) --> x -> number local funcNode = vm.compileNode(func) for n in funcNode:eachObject() do - if n.type == 'doc.type.function' then + if n.type == 'doc.type.function' and n.args[aindex] then local argNode = vm.compileNode(n.args[aindex]) for an in argNode:eachObject() do if an.type ~= 'doc.generic.name' then @@ -1147,7 +1147,7 @@ local function compileFunctionParam(func, source) if extClass then vm.getClassFields(suri, extClass, key, function (field, isMark) for n in vm.compileNode(field):eachObject() do - if n.type == 'function' then + if n.type == 'function' and n.args[aindex] then local argNode = vm.compileNode(n.args[aindex]) for an in argNode:eachObject() do if an.type ~= 'doc.generic.name' then -- cgit v1.2.3