2 // Copyright (C) 2023 Alexey Shvayka. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-globaldeclarationinstantiation
6 description: No let binding collision with existing var declaration due to strict-mode eval().
8 PerformEval ( x, strictCaller, direct )
11 16. If direct is true, then
12 a. Let lexEnv be NewDeclarativeEnvironment(runningContext's LexicalEnvironment).
14 18. If strictEval is true, set varEnv to lexEnv.
18 eval('if (true) { function test262Fn() {} }');
20 $262.evalScript('let test262Fn = 1;');
22 assert.sameValue(test262Fn, 1);