summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-21 17:39:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-21 17:39:41 +0800
commit7699e4ba610e570199f0b8c9097a5cdeda472c40 (patch)
tree3a679f4de0cbca2d847f20f8114acaeb679f1c1c /script
parent2adc24974ffa9b804e9b99a9b8f777a5220f7e89 (diff)
downloadlua-language-server-7699e4ba610e570199f0b8c9097a5cdeda472c40.zip
fix #1335
Diffstat (limited to 'script')
-rw-r--r--script/vm/sign.lua4
-rw-r--r--script/vm/type.lua3
2 files changed, 7 insertions, 0 deletions
diff --git a/script/vm/sign.lua b/script/vm/sign.lua
index a0478751..7c95fd08 100644
--- a/script/vm/sign.lua
+++ b/script/vm/sign.lua
@@ -63,6 +63,10 @@ function mt:resolve(uri, args, removeGeneric)
resolve(object.node, vm.compileNode(field.extends))
end)
end
+ if n.type == 'table' and #n >= 1 then
+ -- { x } / { ... } -> T[]
+ resolve(object.node, vm.compileNode(n[1]))
+ end
end
end
if object.type == 'doc.type.table' then
diff --git a/script/vm/type.lua b/script/vm/type.lua
index 6f2d6f35..d112be2c 100644
--- a/script/vm/type.lua
+++ b/script/vm/type.lua
@@ -310,6 +310,9 @@ function vm.getTableValue(uri, tnode, knode, inversion)
end
end
end
+ if field.type == 'varargs' then
+ result:merge(vm.compileNode(field))
+ end
end
end
end