diff options
Diffstat (limited to 'script/core/hover/name.lua')
-rw-r--r-- | script/core/hover/name.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua index f8473638..3fabfb89 100644 --- a/script/core/hover/name.lua +++ b/script/core/hover/name.lua @@ -20,6 +20,9 @@ local function asField(source, oop) local class if source.node.type ~= 'getglobal' then class = vm.getInfer(source.node):viewClass() + if class == 'any' or class == 'unknown' then + class = nil + end end local node = class or buildName(source.node, false) @@ -47,14 +50,12 @@ end local function asDocFunction(source, oop) local doc = guide.getParentType(source, 'doc.type') or guide.getParentType(source, 'doc.overload') - if not doc or not doc.bindSources then + if not doc or not doc.bindSource then return '' end - for _, src in ipairs(doc.bindSources) do - local name = buildName(src, oop) - if name ~= '' then - return name - end + local name = buildName(doc.bindSource, oop) + if name ~= '' then + return name end return '' end |