// 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-named-expr.template
/*---
description: Abrupt completion returned by GetIterator (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [Symbol.iterator, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, 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;
f = async function* g([x, y, z]) {
};
assert.throws(TypeError, function() {
f([1, 2, 3]);
});