blob: a426fd9c182c09665ccdafbf1c5d3222741a3a73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
var await = 1;
async function getClass() {
return class {
x = await;
};
}
getClass().then(cl => {
assertEq(new cl().x, 1);
});
assertEq(raisesException(SyntaxError)(`
async () => class { [await] = 1 };
`), true);
assertEq(raisesException(SyntaxError)(`
async () => class { x = await 1 };
`), true);
if (typeof reportCompare === "function")
reportCompare(true, true);
|