summaryrefslogtreecommitdiff
path: root/script/vm/generic.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/generic.lua')
-rw-r--r--script/vm/generic.lua13
1 files changed, 12 insertions, 1 deletions
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,