blob: 57a029423aaa0d87f37de377a415b69d509c8853 [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-func-expr-named-fn-body-cntns-arguments-lex-bind-
name: Declare |arguments| when the function body contains an |arguments| lexical binding.
esid: sec-evaldeclarationinstantiation
flags: [async,noStrict]
features: [globalThis]
---*/
const oldArguments = globalThis.arguments;
let f = async function f(p = /*{ parameter-code }*/) {
let arguments;
}
f().then($DONE, error => {
assert(error instanceof SyntaxError);
assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged");
}).then($DONE, $DONE);