Title:
syntax checker reports "invalid token" when a cfscript function returns type "component"
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Zak Burke / zburke (Zak Burke)
Created: 09/12/2014
Components: General - IDE
Versions: 2016,3.0,2018
Failure Type:
Found In Build/Fixed In Build: 3.0 Final / 312450
Priority/Frequency: Major / All users will encounter
Locale/System: ALL / Mac 10.9
Vote Count: 0
Problem Description:
The syntax checker wrongly reports a syntax error for functions defined in a cfscript block that return the type "component".
Steps to Reproduce:
Enter the following code:
<cfscript>
public component function init() {
return this;
}
</cfscript>
Actual Result:
IDE reports:
Invalid Token t function init() { at line 2, column 16
Invalid Token </ at line 5, column 1
Missing semicolon
Expected Result:
None.
Any Workarounds:
Use a tag-based function definition, e.g. <cffunction name="init" returntype="component" access="public">
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3823554
External Customer Info:
External Company:
External Customer Name: zburke
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: