From 84cd1c05f26842c2ae72238ec5d68bba8464ef4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 12 Jul 2022 16:28:49 +0800 Subject: fix --- script/vm/type.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'script/vm/type.lua') 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 -- cgit v1.2.3