Skip to content

Commit 8442850

Browse files
committed
update unused-vararg
1 parent a9e6ddc commit 8442850

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

script/core/diagnostics/unused-vararg.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ return function (uri, callback)
2525

2626
for _, arg in ipairs(args) do
2727
if arg.type == '...' then
28-
if not arg.ref then
28+
if not arg.ref and not arg.name then
2929
callback {
3030
start = arg.start,
3131
finish = arg.finish,

test/diagnostics/unused-vararg.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ local function f(<!...!>)
44
end
55
f()
66
]]
7+
8+
TEST [[
9+
local function f(...args)
10+
return 'something'
11+
end
12+
]]

0 commit comments

Comments
 (0)