Skip to content

Commit 3511bfd

Browse files
author
d-enk
committed
fix: doc.type.function resolve only existing arg.extends
1 parent 50dfc81 commit 3511bfd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

script/vm/sign.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,15 @@ function mt:resolve(uri, args)
142142
end
143143
if object.type == 'doc.type.function' then
144144
for i, arg in ipairs(object.args) do
145-
for n in node:eachObject() do
146-
if n.type == 'function'
147-
or n.type == 'doc.type.function' then
148-
---@cast n parser.object
149-
local farg = n.args and n.args[i]
150-
if farg then
151-
resolve(arg.extends, vm.compileNode(farg))
145+
if arg.extends then
146+
for n in node:eachObject() do
147+
if n.type == 'function'
148+
or n.type == 'doc.type.function' then
149+
---@cast n parser.object
150+
local farg = n.args and n.args[i]
151+
if farg then
152+
resolve(arg.extends, vm.compileNode(farg))
153+
end
152154
end
153155
end
154156
end

0 commit comments

Comments
 (0)