diff options
Diffstat (limited to 'js/src/tests/test262/language/module-code/top-level-await/syntax/early-no-escaped-await.js')
-rw-r--r-- | js/src/tests/test262/language/module-code/top-level-await/syntax/early-no-escaped-await.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/module-code/top-level-await/syntax/early-no-escaped-await.js b/js/src/tests/test262/language/module-code/top-level-await/syntax/early-no-escaped-await.js new file mode 100644 index 0000000000..b9a733198b --- /dev/null +++ b/js/src/tests/test262/language/module-code/top-level-await/syntax/early-no-escaped-await.js @@ -0,0 +1,26 @@ +// |reftest| error:SyntaxError module +// 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; |