tracker issue : CF-3714942

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

Unhelpful AST parse error thrown when assigning a malformed function call to a var-scoped variable in cfscript.

| View in Tracker

Status/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

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on August 25, 2019 using build 2016.0.01.298513
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:

  1. February 28, 2014 00:00:00: 1_serversettings(1).pdf
  2. February 28, 2014 00:00:00: 2_stacktrace.txt

Comments:

In itself this isn't a big issue. I'm reporting it because it represents what I suspect is a larger class of errors where the cfscript parser masks underlying syntax errors.
Comment by External U.
13139 | February 27, 2014 11:56:10 PM GMT
Yep, just encountered it. And yes, it was quite confusing.
Vote by External U.
13140 | August 05, 2014 08:59:12 PM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
31207 | August 25, 2019 07:50:34 PM GMT