Status/Resolution/Reason: Needs Review//EnhancementRequired
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 04/26/2018
Components: Language
Versions: 2018
Failure Type: Others
Found In Build/Fixed In Build: CF 2018 RC /
Priority/Frequency: Normal /
Locale/System: /
Vote Count: 8
This ER is for final immutability
Note: Currently 'final' blocks reference change. It does not block complex value data change. It'd be MUCH more useful if 'final' meant the data structure was immutable.
Repro:
<cfscript>
final myStruct = {key="value"}
myStruct.key = "changed"
writeDump(myStruct)
</cfscript>
Actual Result: {key="changed"}
Expected Result: coldfusion.compiler.FinalVariableMutationException
Related thread: https://forums.adobeprerelease.com/coldfusionpr/discussion/111/final-doesnt-work-on-structs
Attachments:
Comments: