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