Title:
Bug 80231:When using the new way to create structsso var myStruct = {}; instead of myStruct = structNew(); is very handy and intuitive
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Andrew Scott / Andrew Scott (Andrew Scott)
Created: 10/01/2009
Components: Language, CFSCRIPT
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 259361
Priority/Frequency: Normal / Most users will encounter
Locale/System: English / Platforms All
Vote Count: 1
Problem:
When using the new way to create structsso var myStruct = {}; instead of myStruct = structNew(); is very handy and intuitive.But what is not intuitive is that this stops us from doing something like this in a function definition.function myfunction(struct myStruct={}, array myArray=[])This errors with invalid CFML, and should be fixed.
Method:
<cfscript>
function foo(struct s = {}, array a = []){
return "hello";
}
WriteOutput(foo());
</cfscript>
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040241
External Customer Info:
External Company:
External Customer Name: Andrew Scott
External Customer Email: 3DEA395D4926D3D0992015B9
External Test Config: 10/01/2009
Attachments:
Comments: