Title:
Bug 82787:(Watson Migration Closure)Default cannot be used as an argument name in cfscript
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Elliott Sprehn / Elliott Sprehn (Elliott Sprehn)
Created: 04/30/2010
Components: Language, CFSCRIPT
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Most users will encounter
Locale/System: English / Platforms All
Vote Count: 4
Problem:
Default cannot be used as an argument name in cfscript. Since we can now use default for a function name, we should be able to use it as an argument name too.Understandably usage of the argument requires arguments.default to prevent ambiguation with the default clause of a case statement.
Method:
[vmannebo 5/3/10]
{code}
<cfscript>
public string function default(required string default)
{ return default; }
writeoutput(default("hello"));
</cfscript>
{code}
Result:
Invalid CFML construct found on line 138 at column 33.ColdFusion was looking at the following text:defaultThe CFML compiler was processing:A script statement beginning with public on line 138, column 9.A cfscript tag beginning on line 1, column 2. The error occurred in /Library/WebServer/Documents/testing9/testsuite/function_declarations.cfm: line 138136 : 137 : // Special function names138 : public function default(default) \{}
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041399
External Customer Info:
External Company:
External Customer Name: Elliott Sprehn
External Customer Email: 202D59C844579997992016B7
External Test Config: 04/30/2010
Attachments:
Comments: