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: * When the [[Call]] property for a Function object F is called, the following steps are taken: michael@0: * 2. Evaluate F's FunctionBody; michael@0: * if Result.type is returned then Result.value is returned too michael@0: * michael@0: * @path ch13/13.2/S13.2.1_A7_T1.js michael@0: * @description Returning null. Declaring a function with "function __func()" michael@0: */ michael@0: michael@0: function __func(){ michael@0: var x = null; michael@0: return x; michael@0: } michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: try{ michael@0: var x=__func(); michael@0: } catch(e){ michael@0: $ERROR('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: