// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-init-iter-get-err-array-prototype.case
// - src/dstr-binding/error/async-gen-func-expr-dflt.template
/*---
description: Abrupt completion returned by GetIterator (async generator function expression (default parameter))
esid: sec-asyncgenerator-definitions-evaluation
features: [Symbol.iterator, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Runtime Semantics: BindingInitialization
BindingPattern : ArrayBindingPattern
1. Let iteratorRecord be ? GetIterator(value).
GetIterator ( obj [ , hint [ , method ] ] )
[...]
4. Let iterator be ? Call(method, obj).
Call ( F, V [ , argumentsList ] )
[...]
2. If IsCallable(F) is false, throw a TypeError exception.
---*/
delete Array.prototype[Symbol.iterator];
var f = async function*([x, y, z] = [1, 2, 3]) {
};
assert.throws(TypeError, function() {
f();
});