summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-15 00:05:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-15 00:05:52 +0800
commit54a488b7d5899d412ad37083dca1ef3728a7cdba (patch)
tree8aa8dbdb2225a6adf449ee4b88309c88b2dafb13 /script
parent3e486462ee3dc14bc996d553c8e456e603b762bc (diff)
downloadlua-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.lua2
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