blob: 67577ab4e3437e09b53eac950499d1f7f4a1b3ee [file] [log] [blame]
// Make sure duplicated name is allowed in non-strict.
function f0(a, a) {
}
// SyntaxError should be thrown if rest parameter name is duplicated.
assertThrowsInstanceOf(() => eval(`
function f1(a, ...a) {
}
`), SyntaxError);
// SyntaxError should be thrown if there is a duplicated parameter.
assertThrowsInstanceOf(() => eval(`
function f2(a, a, ...b) {
}
`), SyntaxError);
reportCompare(0, 0, 'ok');