michael@0: load(libdir + "asserts.js"); michael@0: assertThrowsInstanceOf( michael@0: function() { michael@0: function foo() {} michael@0: foo = null; michael@0: (function bar(e) { michael@0: try { michael@0: (function() { e; }); michael@0: throw 1; michael@0: } catch (e) { michael@0: foo(); michael@0: } michael@0: })(); michael@0: }, michael@0: TypeError);