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('var test262Var;');
19 eval('function test262Fn() {}');
21 $262.evalScript('let test262Var = 1;');
22 assert.sameValue(test262Var, 1);
24 $262.evalScript('const test262Fn = 2;');
25 assert.sameValue(test262Fn, 2);