summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-04 16:10:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-04 16:10:31 +0800
commitc83d18a6d66162a08d86955f4ceac886cb105e6d (patch)
treef28efe4cde7e7edf832001d7cf670bb610c0487a /script/core
parentc84e917bc53da2cfa29d676c39f36dc638260dd0 (diff)
downloadlua-language-server-c83d18a6d66162a08d86955f4ceac886cb105e6d.zip
improve overload in class
Diffstat (limited to 'script/core')
-rw-r--r--script/core/signature.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/script/core/signature.lua b/script/core/signature.lua
index de38cb80..3465fda2 100644
--- a/script/core/signature.lua
+++ b/script/core/signature.lua
@@ -143,6 +143,19 @@ local function makeSignatures(text, call, pos)
mark[src] = true
signs[#signs+1] = makeOneSignature(src, oop, index)
end
+ elseif src.type == 'global' and src.cate == 'type' then
+ ---@cast src vm.global
+ for _, set in ipairs(src:getSets(guide.getUri(call))) do
+ if set.type == 'doc.class' then
+ for _, overload in ipairs(set.calls) do
+ local f = overload.overload
+ if not mark[f] then
+ mark[f] = true
+ signs[#signs+1] = makeOneSignature(f, oop, index)
+ end
+ end
+ end
+ end
end
end
return signs