Debian Codegraph @

js/src/tests/test262/language/expressions/async-arrow-function/name.js

raw
1 // Copyright (C) 2019 André Bargull. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-async-arrow-function-definitions-runtime-semantics-evaluation
6 description: Assignment of function `name` attribute
7 info: |
8 AsyncArrowFunction : async AsyncArrowBindingIdentifier => AsyncConciseBody
9
10 1. Let scope be the LexicalEnvironment of the running execution context.
11 2. Let parameters be AsyncArrowBindingIdentifier.
12 3. Let closure be ! AsyncFunctionCreate(Arrow, parameters, AsyncConciseBody,
13 scope, "").
14 ...
15 5. Return closure.
16
17 AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
18
19 1. Let scope be the LexicalEnvironment of the running execution context.
20 2. Let head be CoveredAsyncArrowHead of CoverCallExpressionAndAsyncArrowHead.
21 3. Let parameters be the ArrowFormalParameters of head.
22 4. Let closure be ! AsyncFunctionCreate(Arrow, parameters, AsyncConciseBody,
23 scope, "").
24 ...
25 6. Return closure.
26 includes: [propertyHelper.js]
27 ---*/
28
29 verifyProperty(async x => {}, "name", {
30 value: "", writable: false, enumerable: false, configurable: true
31 });
32
33 verifyProperty(async () => {}, "name", {
34 value: "", writable: false, enumerable: false, configurable: true
35 });
36
37 reportCompare(0, 0);