summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/setCallEvalMiddle2.js
blob: b93622f36cca446f827bb8b80b0ab644d6afca53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
eval(1); // avoid global shape change when we call eval below
function q() {
  var x = 1;
  function f() {
    function g() { 
      var t=0;
      for (var i=0; i<3; i++)
        x = i;
      assertEq(x, 2);
      eval("var x = 3");
    };
    g();
    g();
    assertEq(x, 2);
  }
  f();
}
q();