Title:
Bug 83456:CF 9 hotfix 1 is supposed to have fixed some issues with passing implicit arrays into functions
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Andy Fletcher / Andy Fletcher (andyf9)
Created: 06/29/2010
Components: Language
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Win All
Vote Count: 0
Duplicate ID: CF-3041673
Problem:
CF 9 hotfix 1 is supposed to have fixed some issues with passing implicit arrays into functions. Unfortunately it appears to have broken code that was working previously to pass implicit arrays into function with named parameters.Calling a function with named argument that has an implicit array as value (e.g. arr=[value,value]) fails. It used to work without hotfix 1. I have seen it both fail compilation and more worryingly compile, but not include previous lines of code in the compiled code. (I have arrived at this conclusion by realising that code that used to run was not running after the update and then seeing the debugger step over the entire block that was before a line with this named argument implicit array syntax)Unfortunately I cannot post the code that caused CF code to be skipped and I haven't been able to reproduce with a smaller test.
Method:
<cffunction name="func1">
<cfargument name="x"/>
<cfargument name="arr" type="array" required="true"/>
<cfdump var="#arguments.arr#"/>
</cffunction>
<cfset foo = "Hello World"/>
<!--- this line fails compilation, but used to work without hotfix 1 --->
<cfset func1(x=1, arr=[foo])/>
<!--- this also fails --->
<cfset bar = "Rhubarb"/>
<cfset func1(x=1, arr=[foo,bar])/>
<!--- this works fine --->
<cfset arrfoo = [foo]/>
<cfset func1(x=1, arr=arrfoo)/>
<!--- this also works --->
<cfset func1(1, [foo])/>
Result:
The CFML compiler encountered an unexpected java.lang.IllegalStateException exception.The reason for this was: no parent Occurred at:java.lang.IllegalStateException: no parentat coldfusion.compiler.Node.getFunctionDef(Node.java:452)at coldfusion.compiler.SemanticAnalyzer.transformRuntimeCall(SemanticAnalyzer.java:805)at coldfusion.compiler.SemanticAnalyzer.transform(SemanticAnalyzer.java:296)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:95)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:77)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:27)at coldfusion.compiler.SemanticAnalyzer.adjustInitializerStmtNodeTagAttr(SemanticAnalyzer.java:1166)at coldfusion.compiler.SemanticAnalyzer.preTransform(SemanticAnalyzer.java:146)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:21)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:27)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:77)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:77)at coldfusion.compiler.Treewalker.postorder(Treewalker.java:27)at coldfusion.compiler.Treewalker.pos...
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041721
External Customer Info:
External Company:
External Customer Name: Andy Fletcher
External Customer Email: 21686C2144EC85C7992015A8
External Test Config: 06/29/2010
Attachments:
Comments: