summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/lexical-environment/with-global-ignores-global-let-variables.js
blob: 042f92f688de0afbb21f29130bd0beb0bc3a572c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/

let v = "global-v";

function f(v, global)
{
  with (global)
    return v;
}

assertEq(f("argument-v", this), "argument-v",
         "let-var shouldn't appear in global for |with| purposes");

if (typeof reportCompare === "function")
  reportCompare(true, true);

print("Tests complete");