summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-14 16:21:44 +0800
committersumneko <sumneko@hotmail.com>2019-05-14 16:21:44 +0800
commitd5276f49eb7a0fa89b15ef7d014c155345fdb980 (patch)
tree3f87d3d24d15b7cd4ced875639898803bb881f83 /server/src
parentb5a351cd77cb6f7ddde692557cf0c5049d5ffbac (diff)
downloadlua-language-server-d5276f49eb7a0fa89b15ef7d014c155345fdb980.zip
回调函数不检查参数数量
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/diagnostics.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua
index 16132bee..93cf34d9 100644
--- a/server/src/core/diagnostics.lua
+++ b/server/src/core/diagnostics.lua
@@ -219,6 +219,18 @@ function mt:searchRedundantParameters(callback)
return
end
+ -- 回调函数不检查
+ local simple = source:get 'simple'
+ if simple and simple[2] == source then
+ local loc = simple[1]:bindLocal()
+ if loc then
+ local source = loc:getSource()
+ if source:get 'arg' then
+ return
+ end
+ end
+ end
+
local value = source:findCallFunction()
if not value then
return