diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-10 21:55:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-10 21:55:52 +0800 |
commit | f49a70c5a28ef163ffaf8fdc17dd0dbe3816c4e2 (patch) | |
tree | f42dda2981bf7c0e015949d0e3fb0ef1b433b542 /script-beta/core/diagnostics | |
parent | 147486a480a7ce5b56361751166f997def5f9b5b (diff) | |
download | lua-language-server-f49a70c5a28ef163ffaf8fdc17dd0dbe3816c4e2.zip |
修正bug
Diffstat (limited to 'script-beta/core/diagnostics')
-rw-r--r-- | script-beta/core/diagnostics/redundant-parameter.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/script-beta/core/diagnostics/redundant-parameter.lua b/script-beta/core/diagnostics/redundant-parameter.lua index b9b994b8..8d486aea 100644 --- a/script-beta/core/diagnostics/redundant-parameter.lua +++ b/script-beta/core/diagnostics/redundant-parameter.lua @@ -64,9 +64,8 @@ return function (uri, callback) local funcArgs vm.eachDef(func, function (info) local src = info.source - local f = src.value - if f and f.type == 'function' then - local args = countFuncArgs(f) + if src.type == 'function' then + local args = countFuncArgs(src) if not funcArgs or args > funcArgs then funcArgs = args end |