tracker issue : CF-4203408

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

Nested structure

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Dave Levin / ()

Created: 10/25/2018

Components: Functions

Versions: 2016,11.0,13.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: latest /

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Windows 10 64 bit

Vote Count: 2

Problem Description:
Referencing a variable in a nested structure generates an exception error:
Steps to Reproduce:
https://trycf.com/gist/044ee4daf84fe98fbaa5aed6fc3e6b65/acf2018?theme=monokai

OR

<cfoutput>
    <cfloop array="#['apples', 'oranges', 'bananas']#" item="a">

    #renderView(
        view = "location/myView",
        args = {
            fruit = a
        }
    )#

</cfloop>
    
    <cfscript>
        function renderView() {
            writeDump( arguments );
        }
    </cfscript>
    
</cfoutput>
Actual Result:
"Variable A is undefined. on line 7"
Expected Result:
It should be able to know what A is.
Any Workarounds:
Assemble the nested structure first.

Attachments:

Comments:

This is really basic stuff and should just work. Tested in Lucee and it works fine there.
Comment by Bradley Wood
29849 | October 25, 2018 06:28:27 PM GMT
Pretty sure I ran into this in some TDD mocks. Had to duplicate test data and then return. The code provided should work.
29979 | November 28, 2018 01:11:58 AM GMT