summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBranchingUnstableObject.js
blob: 338ae73c0bf6cdf1cd6abfb37efa029d9bfaf4ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function testBranchingUnstableObject() {
  var x = {s: "a"};
  var t = "";
  for (var i=0; i < 100; ++i) {
      if (i == 51)
      {
        x.s = 5;
      }
      t += x.s;
  }
  return t.length;
}
assertEq(testBranchingUnstableObject(), 100);