summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/inline/undefinedLocal.js
blob: f6fb1299661a5ca356a07e815d824ef5ecad8302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

function bar(n) {
  var a;
  if (n < 50)
    a = n;
  return a;
}

function foo() {
  for (var i = 0; i < 100; i++) {
    var q = bar(i);
    if (i < 50)
      assertEq(q, i);
    else
      assertEq(q, undefined);
  }
}

foo();