michael@0: try { michael@0: new MyObject; michael@0: } catch (e) {} michael@0: michael@0: function MyObject() { michael@0: return; michael@0: return this; michael@0: } michael@0: michael@0: function Foo(x) { michael@0: if (x) michael@0: this.f = x; michael@0: } michael@0: var q = new Foo(false); michael@0: for (a in q) { assertEq(true, false); } michael@0: michael@0: function Bar(x, y) { michael@0: if (!x) michael@0: return; michael@0: this.f = y; michael@0: } michael@0: var q2 = new Bar(false, true); michael@0: for (b in q2) { assertEq(true, false); }