From c83d18a6d66162a08d86955f4ceac886cb105e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 4 Nov 2022 16:10:31 +0800 Subject: improve overload in class --- script/core/signature.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'script/core') 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 -- cgit v1.2.3