tracker issue : CF-3765527

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

for loop var not available in struct literal for arrayAppend if not wrapped in { }

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)

Created: 05/23/2014

Components: Language

Versions: 10.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: Final / CF11 Update5

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win All

Vote Count: 2

Listed in the version 11.0.05.293506 Issues Fixed doc
Steps to Reproduce:

	function foo() {
		xs = [];
		for (var i=1; i<=10; i++) 
			arrayAppend(xs, {name:i});
	}
        foo();


Actual Result:

  coldfusion.runtime.UndefinedVariableException: Variable I is undefined.

Expected Result:

  no exception
 
Any Workarounds:

	function foo() {
		xs = [];
		for (var i=1; i<=10; i++) 
                {
			arrayAppend(xs, {name:i});
                }
	}

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3765527

External Customer Info:
External Company:  
External Customer Name: henrylearn2rock
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Can't believe we're still finding bugs in the struct literal implementation! -- Adam
Vote by External U.
12055 | May 25, 2014 09:07:14 AM GMT
+1 - Issue also exists in CF11 Update 3 (11,0,03,292024(PreRelease))
Vote by External U.
12056 | November 16, 2014 12:34:11 AM GMT
Verified the fix in build no:11.0.03.292632.
Comment by S P.
12045 | December 15, 2014 12:25:26 PM GMT
Which version is "11.0.03.292632"? 11.0.03 on MY machine is 11,0,03,292480, and there are no further updates..?
Comment by External U.
12046 | December 15, 2014 01:49:06 PM GMT
The fix will be available in the next version of ColdFusion.
Comment by S P.
12047 | December 16, 2014 01:45:48 AM GMT
Right, so it's not *11.0.03* then, is it?
Comment by External U.
12048 | December 16, 2014 03:33:20 AM GMT
No it ain't 11.0.3. It is in the next version.
Comment by S P.
12049 | December 16, 2014 04:43:25 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
12050 | February 20, 2015 09:26:15 AM GMT
Verified this is fixed in CF11 Update 5 (build 11,0,05,293506). Thanks!, -Aaron
Comment by External U.
12051 | November 20, 2015 05:38:03 AM GMT
Not fixed in CF10 Update 18
Comment by External U.
12052 | November 20, 2015 12:45:17 PM GMT
Adobe, At minimum, please fix bugs in the version they were filed against. That should be your starting point. This ticket was filed against CF10 and should also be fixed in a CF10 update. Thanks!, -Aaron
Comment by External U.
12053 | November 20, 2015 04:01:51 PM GMT
Agreed
Comment by External U.
12054 | November 23, 2015 03:15:15 AM GMT