| Summary: | [outline][content assist] JSDT ignores static and prototype methods with the same name | ||
|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Sergey <serge.che> |
| Component: | General | Assignee: | Project Inbox <jsdt.javascript-inbox> |
| Status: | NEW --- | QA Contact: | Chris Jaun <cmjaun> |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
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"