tracker issue : CF-4204099

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

Struct Member Function is invalid construct

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Bernhard D. / ()

Created: 03/14/2019

Components: Core Runtime, Parser/Compiler

Versions: 2018

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: 2018,0,03,314033 / 2020,0,0,314341

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 0

Problem Description:
I som situations I want to find out how some code was called. I use function callStackGet and loop through the result.
ColdFusion throws an exception.

Steps to Reproduce:
<cfset callStack = callStackGet()>
<cfloop from="1" to="#ArrayLen(callStack)#" index="i">
    <cfset csMethod = callStack[i].Function>


Actual Result:

Invalid CFML construct found on line 23 at column 36. 
ColdFusion was looking at the following text:

Expected Result:
The function callign the curren run code is read.

Any Workarounds:
Access the struct in another notation
<cfset csMethod = callStack[i]["Function"]>