| // Copyright (C) 2020 Rick Waldron, André Bargull. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| |
| /*--- |
| path: language/eval-code/direct/async-gen-named-func-expr-no-pre-existing-arguments-bindings-are-present- |
| name: Declare |arguments| when no pre-existing |arguments| bindings are present. |
| esid: sec-evaldeclarationinstantiation |
| flags: [noStrict] |
| features: [globalThis] |
| ---*/ |
| const oldArguments = globalThis.arguments; |
| let f = async function * f(p = /*{ parameter-code }*/) {} |
| |
| assert.throws(SyntaxError, f); |
| assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged"); |