blob: 9920133fb3b4f062e3e7d2a07c6163dc0726a136 [file] [log] [blame]
(function () {
var target = {};
var handler = {
get: function ()
{
throw new Error('ng');
}
};
var array = {
hello: 42
};
var proxy = new Proxy(target, handler);
array[Symbol.unscopables] = proxy;
var thrown = null;
try {
with (array) {
hello;
}
} catch (error) {
thrown = error;
}
if (thrown === null)
throw new Error(`not thrown`);
if (String(thrown) !== `Error: ng`)
throw new Error(`bad error: ${String(thrown)}`);
}());