tracker issue : CF-4205246

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

Parsing error with fat arrow UDFs

| 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: 1

Problem Description:

Fat arrow UDFs do not always parse correctly, causing errors.

Steps to Reproduce:


{code:java}
func = x => { x=x+1; }
writeDump( func(5) )
{code}


Actual Result:

Code parsing error:

Invalid CFML construct found on line x at column y. 
ColdFusion was looking at the following text: =


Expected Result:

undefined (since there is no return statement in the body of the UDF)

Any Workarounds:

None

Attachments:

Comments:

Relates to https://tracker.adobe.com/#/view/CF-4205245
Vote by Jonathan C.
31373 | September 24, 2019 07:05:55 PM GMT
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.
31383 | September 25, 2019 04:32:35 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.
31462 | September 29, 2019 05:33:31 PM GMT