Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 454760

Summary: [hover] The argument type is wrong in hover with complex closure types
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2014-12-10 11:09:28 EST
Consider the following snippet:

/**
* Finds the closest doc comment to this node
* @param {{range:Array.<Number>}} node
* @param {Array.<{range:Array.<Number>}>} doccomments
* @return {{value:String,range:Array.<Number>}}
*/
function findAssociatedCommentBlock(node, doccomments) {

}

If you hover of that decl the second param is wrong:

findAssociatedCommentBlock(node, doccomments)

Finds the closest doc comment to this node

Parameters:

  (Object) node

  (undefined[]) doccomments

Returns:

  (Object)

I'll have to check if {Array.<{range:Array.<Number>}>} is even valid syntax.
Comment 1 Michael Rennie CLA 2014-12-11 11:51:59 EST
Fix: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=70566d00e6c50861d1f0c1c50e43605952b111aa


The hover now correctly shows:

findAssociatedCommentBlock(doccomments)

Finds the closest doc comment to this node

Parameters:

  (Object) node

  (Number[]) doccomments

Returns:

  (Object)