Created
February 20, 2012 15:44
-
-
Save bennadel/1869714 to your computer and use it in GitHub Desktop.
ColdFusion 10 Beta - Critical Bug In Compiling Function Expressions / Closures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
Start a CFScript block. Closures can only be used inside | |
of CFScript due to the syntax required to define them. | |
---> | |
<cfscript> | |
// I return any arguments that I received. | |
function echoArguments(){ | |
// Simply return the arguments. | |
return( arguments ); | |
} | |
// ------------------------------------------------------ // | |
// ------------------------------------------------------ // | |
// Demonstrate parsing bug -- function expression cannot be | |
// first of N arguments. | |
echoArguments( | |
function(){ | |
// Function expression .... | |
}, | |
3 | |
); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment