diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-14 16:09:38 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-14 16:09:38 +0800 |
commit | b5a351cd77cb6f7ddde692557cf0c5049d5ffbac (patch) | |
tree | f633e19250fae4b7ccea8265cba029d435420eef /server/test | |
parent | fe3930a9f692c07eede7de3cb341ea0749b2e2ba (diff) | |
download | lua-language-server-b5a351cd77cb6f7ddde692557cf0c5049d5ffbac.zip |
检查未使用的不定参数
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/diagnostics/init.lua | 9 |
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) ]] |