Found a new bug today in Coldfusion 7. Basically if you create structure via arguments and try to use it later you’ll notice some funky behaviour and the meta information about the structure is incorrect. Code test case is included.

function struct() { return arguments; } <cfset s = struct(arg1="blahblah", arg2="cont", arg3="act")>

#s.getClass()#

length: #structcount(s)# (#structkeylist(s)#)
<cfset structdelete(s, 'arg1')> length: #structcount(s)# (#structkeylist(s)#)
<cfset structdelete(s, 'arg2')> length: #structcount(s)# (#structkeylist(s)#)
<cfset s = structnew()> <cfset s['arg1'] = "blahblah"> <cfset s['arg2'] = "cont"> <cfset s['arg3'] = "act">

#s.getClass()#

length: #structcount(s)# (#structkeylist(s)#)
<cfset structdelete(s, 'arg1')> length: #structcount(s)# (#structkeylist(s)#)
<cfset structdelete(s, 'arg2')> length: #structcount(s)# (#structkeylist(s)#)