blob: 7cb61eb440a22751343dfa7c7a6a65797a30ecb1 [file] [edit]
// 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-func-decl-fn-body-cntns-arguments-func-decl-
name: Declare |arguments| when the function body contains an |arguments| function declaration.
esid: sec-evaldeclarationinstantiation
flags: [noStrict]
features: [globalThis]
---*/
const oldArguments = globalThis.arguments;
async function * f(p = /*{ parameter-code }*/) {
function arguments() {}
}
assert.throws(SyntaxError, f);
assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged");