tracker issue : CF-4205248

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

Parsing error with fat arrow UDF with default argument value

| View in Tracker

Status/Resolution/Reason: To Test//Fixed

Reporter/Name(from Bugbase): Bradley W. / ()

Created: 09/24/2019

Components: Language

Versions: 2018

Failure Type: Crash

Found In Build/Fixed In Build: Update 5 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Platforms All

Vote Count: 0

Problem Description:

Passing a fat arrow function to a BIF with a default value on one of the parameters causing a parsing error.

Steps to Reproduce:


{code:java}
<cfscript>
myArr = [3,3,3]
writeDump( myArr.reduce( (acc=0,x) => {return acc+x} ) )
</cfscript>
{code}

Actual Result:

The value cfindex2ecfm554899937$func_CF_ANONYMOUSCLOSURE_444 cannot be converted to a number.

Expected Result:

9

Any Workarounds:

No

Attachments:

Comments:

Here's a set of tests that show all known bugs in Lucee and Adobe CF's fat arrow functions along with a reference implementation in JS where everything passes. https://github.com/bdw429s/CFML-lambda-fat-arrow-functions
Comment by Bradley W.
31381 | September 25, 2019 04:32:43 PM GMT
Hi All, This issue is fixed now. Please reach out to ColdFusion support @ [cfinstal@adobe.com|mailto:cfinstal@adobe.com] to get the patch. -Nimit
Comment by Nimit S.
31460 | September 29, 2019 05:36:38 PM GMT