From 587a0d5b8cd81914982633c61d95a0369b8062e8 Mon Sep 17 00:00:00 2001 From: sumneko Date: Mon, 7 Mar 2022 01:18:35 +0800 Subject: update --- script/vm/generic.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'script/vm/generic.lua') diff --git a/script/vm/generic.lua b/script/vm/generic.lua index 7080623c..705f6834 100644 --- a/script/vm/generic.lua +++ b/script/vm/generic.lua @@ -13,7 +13,7 @@ mt.type = 'generic' local function cloneObject(node, resolved) if node.type == 'doc.generic.name' then local key = node[1] - return resolved[key] + return resolved[key] or node end if node.type == 'doc.type' then local newType = { @@ -28,6 +28,17 @@ local function cloneObject(node, resolved) end return newType end + if node.type == 'doc.type.arg' then + local newArg = { + type = node.type, + start = node.start, + finish = node.finish, + parent = node.parent, + name = node.name, + extends = cloneObject(node.extends, resolved) + } + return newArg + end if node.type == 'doc.type.function' then local newDocFunc = { type = node.type, -- cgit v1.2.3