babel/test/fixtures/traceur/Spread/CallWithUndefined.js
2015-01-04 19:40:09 +11:00

9 lines
150 B
JavaScript

function f(...args) {
return args;
}
assert.throw(function() {
// Should throw due to ToObject(undefined)
f(0, ...undefined, 1);
}, TypeError)