Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/prop-def-invalid-async-prefix.js

raw
1 // Copyright (C) 2017 Mozilla Corporation. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 async is not a valid prefix of an identifier reference
7 esid: sec-object-initializer
8 info: |
9 PropertyDefinition:
10 IdentifierReference
11 CoverInitializedName
12 PropertyName : AssignmentExpression
13 MethodDefinition
14
15 MethodDefinition:
16 PropertyName ( UniqueFormalParameters ) { FunctionBody }
17 AsyncMethod
18
19 AsyncMethod:
20 async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
21 VariableDeclaration : BindingPattern Initializer
22
23 1. Let rhs be the result of evaluating Initializer.
24 2. Let rval be GetValue(rhs).
25 3. ReturnIfAbrupt(rval).
26 4. Return the result of performing BindingInitialization for
27 BindingPattern passing rval and undefined as arguments.
28 negative:
29 phase: parse
30 type: SyntaxError
31 ---*/
32
33 throw "Test262: This statement should not be evaluated.";
34
35 ({async async});