Community
Participate
Working Groups
Build Identifier: 20110916-0149, JSDT: 1.3.1.v20110810 Imagine we have a class A in file1.js, which is extended in file2.js: A.prototype.func = function() { return new A(); } When instantiating the class, the resulting variable correctly knows all methods defined in file1.js and file2.js, as does the return value of A.func(). However, now we add a third file3.js, where A is instantiated. The resulting variable again knows alls methods defined before, but the variable returned by A.func() only knows the methods defined in file2.js. Reproducible: Always Steps to Reproduce: 1.Import attached files (bug-1 to -3) into Eclipse 2.Hover mouse over bugXXXd.op1() in bug-3.js 3.Additionally, enter "bugXXXd." and press Ctrl-Space
Created attachment 204183 [details] bug-1.js: Definition of class
Created attachment 204185 [details] bug-2.js: Extension of class
Created attachment 204186 [details] bug-3.js: Usage of class
Created attachment 204187 [details] bug-3.js: Usage of class
Probably the content assist functionality was fixed somehow in some other issue. At least I cannot reproduce the Content Assist or Hover problems (at least for the methods defined in class Bug359228). But I see Content Outline problems here: in bug-3.js: Variable bug359228d's type is displayed as "any" (but it should be of type "Bug359228" - if it's not, why content assist shows the methods of that class?); in bug-2.js: Variable bug359228b's type is displayed as "any" (but it should be of type "Bug359228" - again, if it's not, why content assist shows the methods of that class?); As well as Hover problems for variables: For any file, if you'll hover the mouse cursor over any variable you'll see that every variable's type is displayed as "any" instead of correct type "Bug359228" (for example: "any bug359228c - bug-3.js"), even if Content Outline shows it's correct type "Bug359228".