From 91869bc5f447dc07ecc78695852e719c67af9b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 9 Aug 2023 16:30:21 +0800 Subject: fix wrong hover and signature for method with varargs and overloads --- script/vm/function.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'script/vm/function.lua') diff --git a/script/vm/function.lua b/script/vm/function.lua index bdd7e229..c6df6349 100644 --- a/script/vm/function.lua +++ b/script/vm/function.lua @@ -372,8 +372,14 @@ function vm.isVarargFunctionWithOverloads(func) if not func.args then return false end - if not func.args[1] or func.args[1].type ~= '...' then - return false + if func.args[1] and func.args[1].type == 'self' then + if not func.args[2] or func.args[2].type ~= '...' then + return false + end + else + if not func.args[1] or func.args[1].type ~= '...' then + return false + end end if not func.bindDocs then return false -- cgit v1.2.3