diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-12 16:28:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-12 16:28:49 +0800 |
commit | 84cd1c05f26842c2ae72238ec5d68bba8464ef4d (patch) | |
tree | d1b49e150d6bbade44c48809bbad26d22b40415b /script/vm/type.lua | |
parent | c7c1249dc0b30fa47dc8b8f12a9bb8a8995cfa6c (diff) | |
download | lua-language-server-84cd1c05f26842c2ae72238ec5d68bba8464ef4d.zip |
fix
Diffstat (limited to 'script/vm/type.lua')
-rw-r--r-- | script/vm/type.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/script/vm/type.lua b/script/vm/type.lua index ed7eba16..0432876c 100644 --- a/script/vm/type.lua +++ b/script/vm/type.lua @@ -153,14 +153,16 @@ function vm.isSubType(uri, child, parent, mark) end -- check class parent - if childName and not mark[childName] and not guide.isBasicType(childName) then + if childName and not mark[childName] then mark[childName] = true + local isBasicType = guide.isBasicType(childName) local childClass = vm.getGlobal('type', childName) if childClass then for _, set in ipairs(childClass:getSets(uri)) do if set.type == 'doc.class' and set.extends then for _, ext in ipairs(set.extends) do if ext.type == 'doc.extends.name' + and (not isBasicType or guide.isBasicType(ext[1])) and vm.isSubType(uri, ext[1], parent, mark) then return true end |