tracker issue : CF-4204099

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

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 / CF2018U5

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:
{code:java}
<cfset callStack = callStackGet()>
<cfloop from="1" to="#ArrayLen(callStack)#" index="i">
    <cfset csMethod = callStack[i].Function>
</cfloop>

{code}

Actual Result:
Exception

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

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

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

Attachments:

Comments: