1 2 3 4 5 6 7 8 9 10
function f(x) { if (x.y()) {}; } f({y: function() {}}); try { f(10); assertEq(0, 1); } catch(e) { assertEq(e instanceof TypeError, true); }