michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * Function's scope chain is started when it is declared michael@0: * michael@0: * @path ch13/13.2/S13.2.2_A19_T3.js michael@0: * @description Function is declared in the object scope and then an exception is thrown michael@0: */ michael@0: michael@0: var a = 1; michael@0: michael@0: var __obj = {a:2}; michael@0: michael@0: try { michael@0: with (__obj) michael@0: { michael@0: var __func = function (){return a;}; michael@0: throw 3; michael@0: } michael@0: } catch (e) { michael@0: ; michael@0: } michael@0: michael@0: result = __func(); michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (result !== 2) { michael@0: $ERROR('#1: result === 2. Actual: result ==='+result); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: michael@0: michael@0: