tracker issue : CF-3037797

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 75859:Calling a UDF passed as an argument fails

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Sean Corfield / Sean Corfield (Sean Corfield)

Created: 03/10/2009

Components: Language, CF Component

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 224771

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 2

Problem:

Calling a UDF passed as an argument fails. This breaks Transfer ORM!

Prior to Centaur Beta 1, the following code worked:

<cfscript>
function test(arg) { return "hello " & arg; }
function foo(fn) { return arguments.fn("caller"); }
writeOutput( foo( test ) );
</cfscript>

Now it fails on the call to arguments.fn("caller") saying:

The fn method was not found.

Either there are no methods with the specified method name and argument types, or the fn method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that matched the provided arguments. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity.

Marking this CRITICAL since it breaks a widely-used framework.



Method:

Run this code:

<cfscript>
function test(arg) { return "hello " & arg; }
function foo(fn) { return arguments.fn("caller"); }
writeOutput( foo( test ) );
</cfscript>

Result:

The fn method was not found.

Either there are no methods with the specified method name and argument types, or the fn method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that matched the provided arguments. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037797

External Customer Info:
External Company:  
External Customer Name: Sean Corfield
External Customer Email: 479B4EDC43F3A88B992016B6
External Test Config: 03/10/2009

Attachments:

Comments:

+1 vote. We probably need a hotfix for this one.
Vote by External U.
23975 | November 10, 2011 07:17:26 PM GMT
This bug has been voted..
Vote by External U.
23976 | November 10, 2011 07:17:27 PM GMT