diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-04-18 14:42:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-04-18 14:42:02 +0800 |
commit | 1b3a03e310e2751edbd49709a2bba1e34caeb9f2 (patch) | |
tree | 95ff5ac0f301700f7ef555c62353a0af78b20283 /script/vm/type.lua | |
parent | 720c39887a8804ffb8b593a7303664407a9e9cbb (diff) | |
download | lua-language-server-1b3a03e310e2751edbd49709a2bba1e34caeb9f2.zip |
支持多个enum合并
Diffstat (limited to 'script/vm/type.lua')
-rw-r--r-- | script/vm/type.lua | 10 |
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 |