Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344935 - [outline][content assist] JSDT ignores static and prototype methods with the same name
Summary: [outline][content assist] JSDT ignores static and prototype methods with the ...
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 05:18 EDT by Sergey CLA
Modified: 2013-06-19 11:11 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey CLA 2011-05-06 05:18:00 EDT
In the following code:

/** @constructor */
function Obj() {};
Obj.method = function() {};
Obj.prototype.method = function() {};

...class Obj contains static and prototype "method".

While this is a perfectly valid code and used in some popular JS libraries (ex. jQuery.get() does AJAX request and jQuery.prototype.get() returns element from current node set), JSDT ignores one of the method definition (in this case, the prototype one) and gives this warning in strict validation:

"The static function method() from the type Obj should be accessed in a static  way"