tracker issue : CF-4202131

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

[ANeff] Bug for: function expression cannot be assigned to final variable

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Aaron Neff / ()

Created: 04/26/2018

Components: Language, Expressions

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.01.308605 / 2018,0,0,309929

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Platforms All

Vote Count: 0

Issue: function expression cannot be assigned to final variable

Repro:
{code:java}
<cfscript>
  final foo = function(){writeOutput("from foo")}
  foo()
  
  suffix = "r"
  final "ba#suffix#" = function(){writeOutput("from bar")}
  bar()
</cfscript>
{code}
Actual Result: coldfusion.compiler.ParseException

Expected Result: "from foo" and "from bar"

Related Ticket: [https://tracker.adobe.com/#/view/CF-4199998]

Related Thread: [https://forums.adobeprerelease.com/coldfusionpr/discussion/182/cf2016-bug-cannot-assign-function-expression-to-dynamic-variable]

Attachments:

Comments: