tracker issue : CF-3040282

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

Bug 80335:Using inline structure syntax for named function arguments against UDFs and CFCs is broken

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Jared Rypka-Hauer / Jared Rypka-Hauer (Jared Rypka-Hauer)

Created: 10/14/2009

Components: Language, Datastructure

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 9,0,0,241018 / 255326

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 0

Problem:

Using inline structure syntax for named function arguments against UDFs and CFCs is broken. funCall(structArg={}) throws a nasty and poorly worded error about a missing temp variable.Switching to funcCall(structArg=structNew()) works fine, as does creating the structure ahead of time and then doing structArg=prefabStructure.
Method:

==================== Test.cfc ====================<cfcomponent name="test" displayname=""><cffunction name="init" access="public" returntype="test" output="false"><cfreturn this /></cffunction><cffunction name="newFunction" access="public" returntype="struct" output="false"><cfargument name="myParm" type="struct" required="true" /><cfreturn arguments.myParm /></cffunction></cfcomponent>==================== /Test.cfc ======================================== Test.cfm ====================<cfscript>myCfc = createObject("component","test").init();parm={};writeDump(myCfc.newFunction(myParm={}));</cfscript>==================== /Test.cfm ====================
Result:

 Variable ___IMPLICITARRYSTRUCTVAR0 is undefined. The error occurred in /Applications/JRun4/servers/cfusion9/cfusion.ear/cfusion.war/CentaurTests/implicits/index.cfm: line 42 : myCfc = createObject("component","test").init();3 : parm={};4 : writeDump(myCfc.newFunction(myParm={}));5 : </cfscript>

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

Watson Bug ID:	3040282

External Customer Info:
External Company:  
External Customer Name: Jared Rypka-Hauer
External Customer Email: 08C411A143BC38A7992016B6
External Test Config: 10/14/2009

Attachments:

Comments: