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 | |
parent | c7c1249dc0b30fa47dc8b8f12a9bb8a8995cfa6c (diff) | |
download | lua-language-server-84cd1c05f26842c2ae72238ec5d68bba8464ef4d.zip |
fix
Diffstat (limited to 'script')
-rw-r--r-- | script/core/hover/args.lua | 4 | ||||
-rw-r--r-- | script/doctor.lua | 2 | ||||
-rw-r--r-- | script/vm/type.lua | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/script/core/hover/args.lua b/script/core/hover/args.lua index 321fb081..bb4d4297 100644 --- a/script/core/hover/args.lua +++ b/script/core/hover/args.lua @@ -46,10 +46,10 @@ local function asFunction(source) end local function asDocFunction(source) + local args = {} if not source.args then - return '' + return args end - local args = {} for i = 1, #source.args do local arg = source.args[i] local name = arg.name[1] diff --git a/script/doctor.lua b/script/doctor.lua index 87cdcfcb..e1044689 100644 --- a/script/doctor.lua +++ b/script/doctor.lua @@ -538,7 +538,7 @@ m.exclude = private(function (...) end) --- 比较2个报告 ----@return string +---@return table m.compare = private(function (old, new) local newHash = {} local ret = {} 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 |