blob: 67f2eedea6e8b6ab84d4d013e2d5dd6495f31b69 [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-lex-bind-
name: Declare |arguments| when the function body contains an |arguments| lexical binding.
esid: sec-evaldeclarationinstantiation
flags: [noStrict]
features: [globalThis]
---*/
const oldArguments = globalThis.arguments;
async function * f(p = /*{ parameter-code }*/) {
let arguments;
}
assert.throws(SyntaxError, f);
assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged");