Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/dstr-async-gen-meth-ary-ptrn-elem-obj-val-undef.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/dstr-binding/ary-ptrn-elem-obj-val-undef.case
3 // - src/dstr-binding/error/async-gen-meth.template
4 /*---
5 description: Nested object destructuring with a value of `undefined` (async generator method)
6 esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
7 features: [async-iteration]
8 flags: [generated]
9 info: |
10 AsyncGeneratorMethod :
11 async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
12 { AsyncGeneratorBody }
13
14 1. Let propKey be the result of evaluating PropertyName.
15 2. ReturnIfAbrupt(propKey).
16 3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
17 Otherwise let strict be false.
18 4. Let scope be the running execution context's LexicalEnvironment.
19 5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
20 AsyncGeneratorBody, scope, strict).
21 [...]
22
23 13.3.3.6 Runtime Semantics: IteratorBindingInitialization
24
25 BindingElement : BindingPattern Initializeropt
26
27 1. If iteratorRecord.[[done]] is false, then
28 [...]
29 e. Else
30 i. Let v be IteratorValue(next).
31 [...]
32 4. Return the result of performing BindingInitialization of BindingPattern
33 with v and environment as the arguments.
34
35 13.3.3.5 Runtime Semantics: BindingInitialization
36
37 BindingPattern : ObjectBindingPattern
38
39 1. Let valid be RequireObjectCoercible(value).
40 2. ReturnIfAbrupt(valid).
41 ---*/
42
43
44 var obj = {
45 async *method([{ x }]) {
46
47 }
48 };
49
50 assert.throws(TypeError, function() {
51 obj.method([]);
52 });