summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-14 16:09:38 +0800
committersumneko <sumneko@hotmail.com>2019-05-14 16:09:38 +0800
commitb5a351cd77cb6f7ddde692557cf0c5049d5ffbac (patch)
treef633e19250fae4b7ccea8265cba029d435420eef /server/test
parentfe3930a9f692c07eede7de3cb341ea0749b2e2ba (diff)
downloadlua-language-server-b5a351cd77cb6f7ddde692557cf0c5049d5ffbac.zip
检查未使用的不定参数
Diffstat (limited to 'server/test')
-rw-r--r--server/test/diagnostics/init.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua
index 2ef052bf..cb842f71 100644
--- a/server/test/diagnostics/init.lua
+++ b/server/test/diagnostics/init.lua
@@ -149,7 +149,6 @@ TEST [[
(''):sub(1, 2)
]]
-
TEST [=[
return [[
@@ -177,6 +176,12 @@ f()
]]
TEST [[
+local function f(<!...!>)
+end
+f()
+]]
+
+TEST [[
local function f(var)
print(var)
end
@@ -218,7 +223,7 @@ mt:f(1, 2, <!3!>, <!4!>)
TEST [[
local function f(a, b, ...)
- return a, b
+ return a, b, ...
end
f(1, 2, 3, 4)
]]