blob: 1c7f8df689ec5e15b23deb5765ed966411fa5cb4 (
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 AsyncGenerator = async function*(){}.constructor;
assertThrowsInstanceOf(() => {
Reflect.construct(AsyncGenerator, ["@error"], newTarget);
}, SyntaxError);
assertEq(getProtoCalled, false);
if (typeof reportCompare === "function")
reportCompare(true, true);
|