blob: da8f1f9d55f9f9e73dd7daaea5da22bc28297988 [file] [log] [blame]
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-val-null.case
// - src/dstr-binding/error/async-gen-func-named-expr.template
/*---
description: Nested array destructuring with a null value (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPattern Initializeropt
1. If iteratorRecord.[[done]] is false, then
[...]
e. Else
i. Let v be IteratorValue(next).
[...]
4. Return the result of performing BindingInitialization of BindingPattern
with v and environment as the arguments.
13.3.3.5 Runtime Semantics: BindingInitialization
BindingPattern : ArrayBindingPattern
1. Let iterator be GetIterator(value).
2. ReturnIfAbrupt(iterator).
---*/
var f;
f = async function* g([[x]]) {
};
assert.throws(TypeError, function() {
f([null]);
});