michael@0: var o = { michael@0: valueOf: function() {} michael@0: }; michael@0: var threw = false; michael@0: function test(t) { michael@0: try { michael@0: for (x[t++] in o) {} michael@0: } catch (err) { michael@0: assertEq(t, 3.14); michael@0: threw = true; michael@0: } michael@0: } michael@0: test(3.14); michael@0: assertEq(threw, true);