From b841b2668dd7d36cbf42c3f261e69e2a70358c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 19 Nov 2020 15:51:13 +0800 Subject: =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=A8=E5=B1=80=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/diagnostics/redundant-parameter.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'script-beta/core/diagnostics/redundant-parameter.lua') diff --git a/script-beta/core/diagnostics/redundant-parameter.lua b/script-beta/core/diagnostics/redundant-parameter.lua index 074e7f7c..dda6c014 100644 --- a/script-beta/core/diagnostics/redundant-parameter.lua +++ b/script-beta/core/diagnostics/redundant-parameter.lua @@ -65,6 +65,9 @@ return function (uri, callback) local funcArgs local defs = vm.getDefs(func) for _, def in ipairs(defs) do + if def.value then + def = def.value + end if def.type == 'function' then local args = countFuncArgs(def) if not funcArgs or args > funcArgs then -- cgit v1.2.3