test262/test/language/module-code/top-level-await/syntax/early-no-escaped-await.js

26 lines
481 B
JavaScript
Raw Normal View History

2019-08-02 23:14:24 +02:00
// Copyright (C) 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
The await keyword can't be escaped
info: |
ModuleItem:
StatementListItem[~Yield, +Await, ~Return]
...
AwaitExpression[Yield]:
await UnaryExpression[?Yield, +Await]
negative:
phase: parse
type: SyntaxError
esid: prod-ModuleItem
flags: [module]
features: [top-level-await]
---*/
$DONOTEVALUATE();
\u0061wait 0;