Skip to content

Instantly share code, notes, and snippets.

@bennadel
Created February 20, 2012 15:44
Show Gist options
  • Save bennadel/1869714 to your computer and use it in GitHub Desktop.
Save bennadel/1869714 to your computer and use it in GitHub Desktop.
ColdFusion 10 Beta - Critical Bug In Compiling Function Expressions / Closures
<!---
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