diff options
author | CppCXY <812125110@qq.com> | 2024-02-22 20:29:13 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2024-02-22 20:29:13 +0800 |
commit | 9b6df71d97a70ee7179949ef9f15368cbf29dcbd (patch) | |
tree | bf7a7e62ed7c164a12bdce437c17262a5235bcec /script/vm/sign.lua | |
parent | 483fe246b6ae8c25d433aa15e43f04f0e71a74d5 (diff) | |
parent | 3e6fd3ce1f2f0528336ded939d776a29bbfaf2eb (diff) | |
download | lua-language-server-9b6df71d97a70ee7179949ef9f15368cbf29dcbd.zip |
Merge branch 'master' of github.com:CppCXY/lua-language-server
Diffstat (limited to 'script/vm/sign.lua')
-rw-r--r-- | script/vm/sign.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/script/vm/sign.lua b/script/vm/sign.lua index 1f434475..38cb2242 100644 --- a/script/vm/sign.lua +++ b/script/vm/sign.lua @@ -142,13 +142,15 @@ function mt:resolve(uri, args) end if object.type == 'doc.type.function' then for i, arg in ipairs(object.args) do - for n in node:eachObject() do - if n.type == 'function' - or n.type == 'doc.type.function' then - ---@cast n parser.object - local farg = n.args and n.args[i] - if farg then - resolve(arg.extends, vm.compileNode(farg)) + if arg.extends then + for n in node:eachObject() do + if n.type == 'function' + or n.type == 'doc.type.function' then + ---@cast n parser.object + local farg = n.args and n.args[i] + if farg then + resolve(arg.extends, vm.compileNode(farg)) + end end end end @@ -254,7 +256,7 @@ function mt:resolve(uri, args) local argNode = vm.compileNode(arg) local knownTypes, genericNames = getSignInfo(sign) if not isAllResolved(genericNames) then - local newArgNode = buildArgNode(argNode,sign, knownTypes) + local newArgNode = buildArgNode(argNode, sign, knownTypes) resolve(sign, newArgNode) end end |