tracker issue : CF-3808978

select a category, or use search below
(searches all categories and all time range)
Title:

function expressions do not support annotations

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 08/20/2014

Components: Language

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Minor / Very few users will encounter

Locale/System: ALL / Platforms All

Vote Count: 1

{code}
/**
* @hint hint for f()
*/ 
f = function(x){
};
{code}

On Railo that correctly specifies the hint for the function. It's ignored on ColdFusion.

-- 
Adam

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3808978

Reason:	BugVerified

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

+1 ......................
Vote by External U.
11316 | November 23, 2014 10:35:38 PM GMT
IMO this syntax for function annotation needs to DIE. KILL IT WITH FIRE. http://fusiongrokker.com/post/sometimes-hate-isn-t-a-strong-enough-word
Comment by External U.
11312 | September 30, 2015 01:05:08 PM GMT
+1 - that syntax needs to go away. Thanks!, -Aaron
Comment by External U.
11313 | September 30, 2015 04:15:13 PM GMT
When to generate, before or after the bill for the following month Annotations do not belong in comments. Java uses Javadoc for documentation and annotations are separate from that and exist within code. That said, the example given for @hint seems appropriate as a doc tag. The doc tags that should not be supported are ones that modify functionality like @returnType, @extends, @output, and @default.
Comment by Kama S.
11314 | August 23, 2017 09:14:38 PM GMT
All these comments are lovely, but they've got nothing to do with the issue at hand. For better or for worse (it's "for worse"), the indicated way is how the CF Team wrong-headedly implemented these annotations. This ticket is nothing to do with whether or not this is a good idea. The boat has sailed on that, and you should have tried to have the conversation with them about this back in the prerelease for CF9 or whenever they were added to the language. That's what I did. And other people also did. Adobe were immovable on the subject. THIS ticket is about how the prescribed behaviour *doesn't work* in the indicated case. TBH though, I don't give a shit any more. The issue should have been dealt with in a timely fashion, three years ago when I raised it and it *did* matter to me.
Comment by Adam C.
11315 | August 23, 2017 09:56:17 PM GMT