diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-19 15:51:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-19 15:51:13 +0800 |
commit | b841b2668dd7d36cbf42c3f261e69e2a70358c6b (patch) | |
tree | 83118b6ff32fd1b93b21605e2494dc6da8144b14 /script-beta/core/diagnostics/redundant-parameter.lua | |
parent | 2c07a7a12bf840e1a90abc117fd5e69866f76fdb (diff) | |
download | lua-language-server-b841b2668dd7d36cbf42c3f261e69e2a70358c6b.zip |
优化全局性能
Diffstat (limited to 'script-beta/core/diagnostics/redundant-parameter.lua')
-rw-r--r-- | script-beta/core/diagnostics/redundant-parameter.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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 |