blob: 2095abfb28956a037ed71ba29d3d0134db6f1d9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
var getProtoCalled = false;
var newTarget = Object.defineProperty(function(){}.bind(), "prototype", {
get() {
getProtoCalled = true;
return null;
}
});
assertThrowsInstanceOf(() => {
Reflect.construct(Function, ["@error"], newTarget);
}, SyntaxError);
assertEq(getProtoCalled, false);
if (typeof reportCompare === "function")
reportCompare(true, true);
|