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_T1.js michael@0: * @description Function is declared in the global scope michael@0: */ michael@0: michael@0: var a = 1; michael@0: michael@0: var __func= function(){return a;}; michael@0: michael@0: var __obj = {a:2}; michael@0: michael@0: with (__obj) michael@0: { michael@0: result = __func(); michael@0: } michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (result !== 1) { michael@0: $ERROR('#1: result === 1. Actual: result ==='+result); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: