-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
Description
To reproduce:
.foo(@a, @rest...) {
.bar(@a, @rest);
}
.bar(@a, @b: false) {}
.foo(@a, true); // works
.foo(@a); // Cannot read properties of undefined (reading 'value')
Current behavior:
Consuming an optional variadic that is not set causes an error.
Expected behavior:
Since (@a, @rest...)
supports 1..N arguments, it should be expected that in the 1
case, @rest
is unset, and if so, passing @rest
should be valid and a no-op instead of an error.
Environment information:
less
version: 4.4.0nodejs
version: v22.12.0operating system
: 6.6.87.2-microsoft-standard-WSL2
dosubot