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 declarations in global or function scope are {DontDelete} michael@0: * michael@0: * @path ch13/13.0/S13_A12_T2.js michael@0: * @description Checking if deleting a function that is declared in function scope fails michael@0: */ michael@0: michael@0: ALIVE="Letov is alive" michael@0: michael@0: function __cont(){ michael@0: michael@0: function __func(){ michael@0: return ALIVE; michael@0: }; michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (delete __func) { michael@0: $ERROR('#1: delete __func returning false'); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#2 michael@0: if (__func() !== ALIVE) { michael@0: $ERROR('#2: __func() === ALIVE. Actual: __func() ==='+__func()); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: }; michael@0: michael@0: __cont(); michael@0: