From a90d1d2c4990fed2db4ac5b2341ff12193389c1c Mon Sep 17 00:00:00 2001 From: fesily Date: Wed, 17 Jan 2024 17:16:48 +0800 Subject: use func.parent.ref --- script/vm/compiler.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'script/vm') diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 96db7051..2222fa9b 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1030,7 +1030,6 @@ local function compileForVars(source, target) return false end ----@async ---@param source parser.object local function compileLocal(source) local myNode = vm.setNode(source, source) @@ -1093,9 +1092,7 @@ local function compileLocal(source) end if not hasDocArg and func.parent.type == 'local' then - local refs = vm.getRefs(func, function (_) - return false - end) + local refs = func.parent.ref local findCall if refs then for i, ref in ipairs(refs) do -- cgit v1.2.3