summaryrefslogtreecommitdiff
path: root/script/vm/type.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-04-18 14:42:02 +0800
committer最萌小汐 <sumneko@hotmail.com>2024-04-18 14:42:02 +0800
commit1b3a03e310e2751edbd49709a2bba1e34caeb9f2 (patch)
tree95ff5ac0f301700f7ef555c62353a0af78b20283 /script/vm/type.lua
parent720c39887a8804ffb8b593a7303664407a9e9cbb (diff)
downloadlua-language-server-1b3a03e310e2751edbd49709a2bba1e34caeb9f2.zip
支持多个enum合并
Diffstat (limited to 'script/vm/type.lua')
-rw-r--r--script/vm/type.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/script/vm/type.lua b/script/vm/type.lua
index 545d2de5..d2a859d0 100644
--- a/script/vm/type.lua
+++ b/script/vm/type.lua
@@ -65,8 +65,14 @@ local function checkParentEnum(parentName, child, uri, mark, errs)
local enums
for _, set in ipairs(parentClass:getSets(uri)) do
if set.type == 'doc.enum' then
- enums = vm.getEnums(set)
- break
+ local denums = vm.getEnums(set)
+ if denums then
+ if enums then
+ enums = util.arrayMerge(enums, denums)
+ else
+ enums = denums
+ end
+ end
end
end
if not enums then