michael@0: // |reftest| require-or(debugMode,skip) michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: michael@0: var err; michael@0: try { michael@0: f = function() { var x; x.y; } michael@0: trap(f, 0, ""); michael@0: f(); michael@0: } catch (e) { michael@0: err = e; michael@0: } michael@0: assertEq(err instanceof TypeError, true); michael@0: assertEq(err.message, "x is undefined") michael@0: michael@0: reportCompare(0, 0, 'ok'); michael@0: