diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-09-06 17:15:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-09-06 17:15:39 +0800 |
commit | c9d819305b6f88b53de294d54c820681518430c8 (patch) | |
tree | b00f7b67e0a845f49db6b4071a695b1bacab7c4e | |
parent | 7c481f57c407f7e4d0b359a3cfbce66add99ec2f (diff) | |
download | lua-language-server-c9d819305b6f88b53de294d54c820681518430c8.zip |
fix
-rw-r--r-- | script/vm/compiler.lua | 4 |
1 files 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 |