blob: 102d98ee8baca9cb33a71f5b1daa192522e7a755 [file] [log] [blame]
try {
eval("(function() { ({ x: 1, y: 1, z: 1, __proto__: 1, __proto__: 1 }) })");
eval("(function() { ({ x: 1, y: 1, z: 1, '__proto__': 1, '__proto__': 1 }) })");
throw new Error('Should have thrown a SyntaxError');
} catch (error) {
if (!(error instanceof SyntaxError) && error.message !== 'Attempted to redefine __proto__ property.')
throw new Error(`Unexpected error: ${error.message}`);
}