blob: fac7636459742d254d0f9ae571bb07f3cab0ea93 [file] [log] [blame]
// return object
let foo = { }
foo[Symbol.toPrimitive] = function() { return {} };
for (i = 0; i < 100000; i++) {
let failed = true;
try {
foo >= 1;
} catch (e) {
if (e instanceof TypeError)
failed = false;
}
if (failed)
throw "should have thrown on return of object";
}
// The general use of Symbol.toPrimitive is covered in the ES6 tests.