summaryrefslogtreecommitdiff
path: root/script/vm/generic.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-03-07 01:18:35 +0800
committersumneko <sumneko@hotmail.com>2022-03-07 01:18:35 +0800
commit587a0d5b8cd81914982633c61d95a0369b8062e8 (patch)
tree7d33e7c62b252f153dc5c9896534e5f52956de17 /script/vm/generic.lua
parent4946063175c1a0cda7a11877b8c2b21b0c447c5f (diff)
downloadlua-language-server-587a0d5b8cd81914982633c61d95a0369b8062e8.zip
update
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,