diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-17 14:39:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-17 14:39:05 +0800 |
commit | 844bc87bcb11fade43e06b5e8ac8421f2b0d3630 (patch) | |
tree | 3679438fb54cc5f3ef664144b8827140a220870a /script/core | |
parent | be5b3c282faa214bf75f0d719d7a0d809bc09aa1 (diff) | |
download | lua-language-server-844bc87bcb11fade43e06b5e8ac8421f2b0d3630.zip |
improve
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/diagnostics/redundant-parameter.lua | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/script/core/diagnostics/redundant-parameter.lua b/script/core/diagnostics/redundant-parameter.lua index a2e60b71..b25ec77a 100644 --- a/script/core/diagnostics/redundant-parameter.lua +++ b/script/core/diagnostics/redundant-parameter.lua @@ -3,7 +3,6 @@ local guide = require 'parser.guide' local vm = require 'vm' local lang = require 'language' local define = require 'proto.define' -local await = require 'await' local function countCallArgs(source) local result = 0 @@ -81,14 +80,7 @@ return function (uri, callback) end local func = source.node - local funcArgs = cache[func] - if funcArgs == nil then - funcArgs = getFuncArgs(func) or false - local refs = vm.getRefs(func) - for _, ref in ipairs(refs) do - cache[ref] = funcArgs - end - end + local funcArgs = getFuncArgs(func) if not funcArgs then return |