summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/setCallEvalMiddle.js
blob: 71de2ac69b3ded0042080e3b0103e7753ace99f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
    };
    g();
    eval("var x = 3");
    g();
    assertEq(x, 2);
  }
  f();
}
q();