Debian Codegraph @

js/src/tests/test262/language/expressions/object/prop-def-invalid-async-prefix.js

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