michael@0: function O(a) { michael@0: this.x = 20; michael@0: var ret = a ? {x: 10} : 26; michael@0: return ret; michael@0: } michael@0: function test() { michael@0: for (var i=0; i<100; i++) { michael@0: var o = new O((i & 1) == 1); michael@0: if (i & 1) michael@0: assertEq(o.x, 10); michael@0: else michael@0: assertEq(o.x, 20); michael@0: } michael@0: } michael@0: test();