diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-15 00:05:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-15 00:05:52 +0800 |
commit | 54a488b7d5899d412ad37083dca1ef3728a7cdba (patch) | |
tree | 8aa8dbdb2225a6adf449ee4b88309c88b2dafb13 /script | |
parent | 3e486462ee3dc14bc996d553c8e456e603b762bc (diff) | |
download | lua-language-server-54a488b7d5899d412ad37083dca1ef3728a7cdba.zip |
fix #1204 `missing-parameter` incorrect
should count returns by `call.node` instead of `call`
Diffstat (limited to 'script')
-rw-r--r-- | script/core/diagnostics/missing-parameter.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/diagnostics/missing-parameter.lua b/script/core/diagnostics/missing-parameter.lua index f69afa79..a475673f 100644 --- a/script/core/diagnostics/missing-parameter.lua +++ b/script/core/diagnostics/missing-parameter.lua @@ -64,7 +64,7 @@ local function countCallArgs(source) return math.huge end if lastArg.type == 'call' then - result = result + countMaxReturns(lastArg) - 1 + result = result + countMaxReturns(lastArg.node) - 1 end result = result + #source.args return result |