summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug511214.js
blob: 611d86e45af2294f259a32845f3fb4eda6ca935a (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;
    };
    g();
    eval("var x = 3");
    g();
    assertEq(x, 2);
  }
  f();
  assertEq(x, 2);
}
q();