summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/async-generator/dstr/dflt-obj-init-null.js
blob: 7666e0fee38247564297371b9a3e2586a3bc5ec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This file was procedurally generated from the following sources:
// - src/dstr-binding/obj-init-null.case
// - src/dstr-binding/error/async-gen-func-decl-dflt.template
/*---
description: Value specifed for object binding pattern must be object coercible (null) (async generator function declaration (default parameter))
esid: sec-asyncgenerator-definitions-instantiatefunctionobject
features: [async-iteration]
flags: [generated]
info: |
    AsyncGeneratorDeclaration : async [no LineTerminator here] function * BindingIdentifier
        ( FormalParameters ) { AsyncGeneratorBody }

        [...]
        3. Let F be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters, AsyncGeneratorBody,
            scope, strict).
        [...]

    Runtime Semantics: BindingInitialization

    ObjectBindingPattern : { }

    1. Return NormalCompletion(empty).
---*/


async function* f({} = null) {
  
};

assert.throws(TypeError, function() {
  f();
});

reportCompare(0, 0);