Skip to content

Commit

Permalink
Merge pull request #2424 from d-enk/fix-sign-resolve-nil-extends
Browse files Browse the repository at this point in the history
fix: `doc.type.function` resolve only existing arg.extends
  • Loading branch information
sumneko authored Nov 24, 2023
2 parents 50dfc81 + 3511bfd commit 8c4aca0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions script/vm/sign.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c4aca0

Please # to comment.