ColdFusion 10.0  -  Bug 3117508

Created on Friday, February 17, 2012

Login for more options

Title

Closures do not work with named arguments.

Description

Problem Description:
When passing a function into another function, closures do not work with named arguments.

Steps to Reproduce:

<cffunction name="doStuff">
<cfargument name="SomeData" />
<cfargument name="SomeFunction" />

<cfreturn arguments />
</cffunction>

<cffunction name="NormalFunc">
<cfreturn Arguments[1] + Arguments[2] />
</cffunction>

<cfscript>
// these three work:
X = doStuff( 'abc' , normalfunc );
X = doStuff( 'abc' , function(){return Arguments[1] + Arguments[2];} );
X = doStuff( SomeData='abc' , SomeFunction=normalfunc );

// this one causes an error:
X = doStuff( SomeData='abc' , SomeFunction=function(){return Arguments[1] + Arguments[2];} );
</cfscript>



Actual Result:
Error: "Invalid construct: Either argument or name is missing."

Expected Result:

Any Workarounds:

Test Configuration

CF10 Beta 1

App Language(s) English
OS Language(s) English
Platform(s) Platforms All
Browser(s) Browsers All

Notes (0)

Duplicate ID
Reported By boughtonp

Status

State Closed
Status Fixed
Reason

Importance

Priority 4-Very High
Frequency All users will encounter
Failure Type Non Functioning
Product Area Language

Build

Found In Build Public Beta
Fixed In Build 281546

Attachments (0)

No Files Attached

Votes (0)

Your session has expired! Click to login
Current form data will be preserved

Cancel