summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/name-inactive-del.js
blob: ba2f69f09ea86ee9ce431285289ef796e8270cb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function mp(g) {
  var ans = '';
  for (var i = 0; i < 5; ++i) {
    ans += g();
  }

  return ans;
}

function f() {
  var k = 5;

  function g() {
    return k;
  }

  ans = '';

  k = 6;
  ans += mp(g);

  delete k;
  ans += mp(g);

  return ans;
}

assertEq(f(), '6666666666');