Title:
Unhelpful AST parse error thrown when assigning a malformed function call to a var-scoped variable in cfscript.
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Jaime Metcher / Jaime Metcher (jaimemetcher)
Created: 02/27/2014
Components: Language
Versions: 10.0
Failure Type: Cosmetic Issue
Found In Build/Fixed In Build: Final / 292177
Priority/Frequency: Minor / Few users will encounter
Locale/System: English / Linux Ubuntu 10.04
Vote Count: 1
Problem Description:
See the code snippet below. Removing the "var" modifier produces the expected result.
Steps to Reproduce:
function test() {
var stuff = FileUpload(destination = "test",accept = "",nameConflict = "MakeUnique",fileField = "test");
}
Actual Result:
Exception: java.lang.ClassCastException: coldfusion.compiler.ASTtagAttribute cannot be cast to coldfusion.compiler.ExprNode
Expected Result:
Exception: coldfusion.compiler.validation.FunctionInvalidParamterExceptionVaradic: Parameter validation error for the FILEUPLOAD function.
The bug I'm reporting here is the unhelpful and inconsistent error. As per https://bugbase.adobe.com/index.cfm?event=bug&id=3540467 I don't think the expected result is a great answer either.
Any Workarounds:
Don't use the unsupported argument syntax. But the real issue here is the time lost working out what's going on.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3714942
External Customer Info:
External Company:
External Customer Name: jaimemetcher
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
- February 28, 2014 00:00:00: 1_serversettings(1).pdf
- February 28, 2014 00:00:00: 2_stacktrace.txt
Comments: