function foo(...args: unknown[]) {}
function bar(...args: unknown[]) {
const x: boolean = false;
const y = x ?? foo(...args);
}
function foo(self, ...)
end
function bar(self, ...)
local x = false
local y = (function(____lhs)
if ____lhs == nil then
return foo(nil, ...) -- error: cannot use '...' outside a vararg function
else
return ____lhs
end
end)(x)
end
Playground
This is caused by transformNullishCoalescingExpression creating its own IIFE instead of using the utility functions. It may be a good idea to wait to fix this after #1116 is finished.
Playground
This is caused by
transformNullishCoalescingExpressioncreating its own IIFE instead of using the utility functions. It may be a good idea to wait to fix this after #1116 is finished.