diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-15 17:00:56 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-15 17:00:56 +0800 |
commit | 0fe4e33123b03003689b96567d6aa13d5805d4d6 (patch) | |
tree | 2ac2a02ca9beda611e4878c1e45a641e4364c602 /server/src/core/diagnostics.lua | |
parent | 12373b0f4e0b44ed98c9eaa8ce0c6b8c3f3697b5 (diff) | |
download | lua-language-server-0fe4e33123b03003689b96567d6aa13d5805d4d6.zip |
以无参数的方式调用对象函数不检查多余参数
Diffstat (limited to 'server/src/core/diagnostics.lua')
-rw-r--r-- | server/src/core/diagnostics.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua index 57703bea..7f47b548 100644 --- a/server/src/core/diagnostics.lua +++ b/server/src/core/diagnostics.lua @@ -220,6 +220,12 @@ function mt:searchRedundantParameters(callback) end local max = #func.args local passed = #args + -- function m.open() end + -- m:open() + -- 这种写法不算错 + if passed == 1 and source:get 'has object' then + return + end for i = max + 1, passed do local extra = args[i] callback(extra.start, extra.finish, max, passed) |