summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/setCallGlobal.js
blob: a4ba54bae825a13a71da7db5f400d86e62087567 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var x = 1;
function f() {
  function g() { 
    var t=0;
    for (var i=0; i<3; i++)
      x = i;
  };
  g();
  eval("var x = 2");
  g();
  assertEq(x, 2);
}
f();
assertEq(x, 2);