tracker issue : CF-3844972

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

Member functions can't be chained to struct/array literals

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood (Bradley Wood)

Created: 10/29/2014

Components: Language

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Platforms All

Vote Count: 13

The following two code examples run as expected on Railo, but produce errors on 11.2

{code:java}
<cfscript>
 writeDump( { foo:'bar' }.append( { bum:'baz' } ) );
 writeDump( [ 'a', 'b' ].append( [ 'c', 'd' ], true ) );
</cfscript>
{code}


Member functions should work after object literals.

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

Watson Bug ID:	3844972

External Customer Info:
External Company:  
External Customer Name: bradwood.com
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

There are actually a couple of bugs already in for this, but they don't have code samples or have been closed.
Comment by External U.
10419 | October 29, 2014 04:16:24 PM GMT
Here's my vote. ..............................
Vote by External U.
10423 | October 29, 2014 07:14:03 PM GMT
+1 (Carl, where was your random length-restriction-busting quote?!)
Vote by External U.
10424 | October 30, 2014 04:33:54 AM GMT
See also: https://bugbase.adobe.com/index.cfm?event=bug&id=CF-3712122 https://bugbase.adobe.com/index.cfm?event=bug&id=CF-3737409
Comment by External U.
10420 | October 30, 2014 04:35:54 AM GMT
+1 ................................
Vote by External U.
10425 | October 30, 2014 05:11:26 AM GMT
This is a valid ask, and we are considering this as a fix for future release. (Comment added from ex-user id:nawani)
Comment by Adobe D.
10421 | October 31, 2014 07:09:01 AM GMT
If I ever end up switching to 11 this would be very useful.
Vote by External U.
10426 | November 03, 2014 09:07:57 AM GMT
+1 ......................
Vote by External U.
10427 | November 26, 2014 05:04:47 AM GMT
casting my vote, so +1 from me
Vote by External U.
10428 | July 09, 2015 02:09:47 PM GMT
Related: https://bugbase.adobe.com/index.cfm?event=bug&id=CF-4018933
Comment by External U.
10422 | July 09, 2015 02:20:27 PM GMT
Related: https://bugbase.adobe.com/index.cfm?event=bug&id=CF-4018933
Vote by External U.
10429 | July 09, 2015 02:20:33 PM GMT
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Vote by External U.
10430 | October 29, 2015 11:19:21 AM GMT
As you can see, Railo/Lucee have supported this for ages so ColdFusion should too.
Vote by External U.
10431 | October 29, 2015 11:21:58 AM GMT
+1 * 1000000!!!! Even look at other built in member functions that chaining would make sense.. like query.addParam().addParam(), etc..
Vote by External U.
10432 | October 29, 2015 03:28:38 PM GMT
+1 ...........................
Vote by External U.
10433 | December 04, 2015 11:30:45 AM GMT
Still annoying 5 years later. Lucee supports this, come on Adobe. Let's enter 2019 please.
Comment by Bradley W.
30963 | June 28, 2019 12:07:05 AM GMT
Hi Brad, +1 - and it says I already voted. Chaining is nice until it runs into CF's rough enforcement of some under-the-hood Java data type that Adobe controls and sometimes changes between versions, instead of chaining just being type-casting and smooth. Thanks!, -Aaron
Comment by Aaron N.
31003 | July 09, 2019 12:59:39 AM GMT
> This is a valid ask, and we are considering this as a fix for future release. > 10/31/2014 07:09:01 GMT Adobe, you know it's 2020 now right?
Comment by Adam C.
33284 | March 09, 2020 05:12:28 PM GMT