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: