Debian Codegraph @

js/src/tests/test262/language/expressions/object/identifier-shorthand-await-strict-mode.js

raw
1 // Copyright (C) 2020 Rick Waldron. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 Object literal shorthands are limited to valid identifier references. await is valid in non-module strict mode code.
7 esid: sec-object-initializer
8 flags: [noStrict]
9 info: |
10 PropertyDefinition:
11 IdentifierReference
12 CoverInitializedName
13 PropertyName : AssignmentExpression
14 MethodDefinition
15 Identifier : IdentifierName but not ReservedWord
16
17 ---*/
18
19 var await = 1;
20 (function() {
21 "use strict";
22 ({
23 await
24 });
25 });
26
27 reportCompare(0, 0);