tracker issue : CF-3201059

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

Struct Literal and semicolons

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Jeff Switzer / Jeff Switzer (Jeff S. [cf-flex])

Created: 05/29/2012

Components: Language

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Problem Description:

There seems to be an issue with empty statements and object literal notation (struct and probably array).  We had some code that had an if() statement with a semi-colon after the if brackets, and weird behavior started occurring. It took forever to track the issue down to the semi-colon;

Steps to Reproduce:
<cfscript>
WriteDump({});;
WriteDump({});
</cfscript>

Actual Result:
Only one empty struct is output.

Expected Result:
Two empty structs should be output.

Any Workarounds:

Remove the "double" semi-colon after the first statement.

It's not limited to "double" semi-colons though.

if (foo == bar) {
// do something
};

causes the issue as well (note the semi-colon after the if brace).

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

Watson Bug ID:	3201059

External Customer Info:
External Company:  
External Customer Name: Jeff S. [cf-flex]
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

I'm able to reproduce this on CF 9.01, but not on CF 10. Can you please try this on CF 10 and see if it works for you. (Comment added from ex-user id:sagarg)
Comment by Adobe D.
19145 | May 29, 2012 10:52:51 PM GMT
I haven't installed CF10 yet. I will try to get to it later this week.
Comment by External U.
19146 | May 30, 2012 06:49:27 AM GMT
This bug is not reproducible on CF 10 and hence closing it. (Comment added from ex-user id:sagarg)
Comment by Adobe D.
19147 | May 30, 2012 10:26:00 PM GMT