Community
Participate
Working Groups
Build ID: M20080911-1700 Steps To Reproduce: 1. Create JavaScript project and put the shown JavaScript code in a file. 2. Note that there is NO JsDoc stuff in it. 3. Note that the editor shows the error "The operator + is undefined for the argument type(s) void, String" when JsDoc parsing is deactivated in the configuration. If it is enabled then no error is shown. Looks to me as if some parsing stuff which has nothing to do with JsDoc is also deactivated when JsDoc parsing is deactivated. Demo source: function Person(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; } Person.prototype.getFullName = function() { return this.firstName + " " + this.lastName; }; function NickPerson(firstName, lastName, nickName) { Person.call(this, firstName, lastName); this.nickName = nickName; } NickPerson.prototype = new Person(); NickPerson.prototype.getFullName = function() { return Person.prototype.getFullName.call(this) + " (" + this.nickName + ")"; };
Created attachment 131843 [details] Updates the system.js library file
I added the return types into the function definitions in the system.js file. Some functions in there, including the call() function, only had their return types defined in the JSdoc. When JSdoc parsing was turned off the editor was unable to determine the return type so it assumed the type of the object was a "void" type. The inference engine probably should try harder to figure out the return type when jsdoc parsing is off, but this fix should handle most cases. Nitin, this can be fixed in 3.0.5 and 3.1.
Applied, thanks, Chris
Confirmed that the bug is fixed in Eclipse 3.5