This commit is contained in:
Mark Miller 2011-09-13 23:21:43 -07:00
parent b796d10c4b
commit fd40a156e4
1 changed files with 3 additions and 2 deletions

View File

@ -10,8 +10,9 @@
* @description: Returning number. Declaring a function with "function __func()"; * @description: Returning number. Declaring a function with "function __func()";
*/ */
var x;
function __func(){ function __func(){
var x = 1; x = 1;
return x; return x;
} }
@ -27,7 +28,7 @@ try {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
try{ try{
var __x=__func() var __x=__func();
} catch(e){ } catch(e){
$ERROR('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e); $ERROR('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e);
} }