test262/test/language/expressions/async-generator/dstr-named-dflt-obj-init-un...

34 lines
980 B
JavaScript
Raw Normal View History

2017-03-20 18:30:18 +01:00
// This file was procedurally generated from the following sources:
// - src/dstr-binding/obj-init-undefined.case
// - src/dstr-binding/error/async-gen-func-named-expr-dflt.template
/*---
description: Value specifed for object binding pattern must be object coercible (undefined) (async generator named function expression (default parameter))
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).
[...]
Runtime Semantics: BindingInitialization
ObjectBindingPattern : { }
1. Return NormalCompletion(empty).
---*/
var f;
2017-04-06 23:52:56 +02:00
f = async function* h({} = undefined) {
2017-03-20 18:30:18 +01:00
};
assert.throws(TypeError, function() {
f();
});