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

Bug 359212

Summary: [content assist] Function return type lost over multiple files
Product: [WebTools] JSDT Reporter: Ingo Rau <ingo.rau>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: NEW --- QA Contact: Chris Jaun <cmjaun>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
bug-1.js: Where the class and method are defined
none
bug-2.js: Where the variables are used none

Description Ingo Rau CLA 2011-09-28 07:46:35 EDT
Build Identifier: 20110916-0149

When using a variable that was globally defined in another file (on the project's source path), its (inferred) type is lost when is was initialized by a function call.

File 1 (snippet, cf. attached bug-1.js):
var obj1 = new Class();
var obj2 = returnsClass(); // just returns a new Class() instance

File 2 (snippet, cf. attached bug-2.js):
obj1.op(); // <== Content assist works, help works
obj2.op(); // <== NO CONTENT ASSIST, NO HELP



Reproducible: Always

Steps to Reproduce:
1.Open attached files in Eclipse
2.Hover mouse over line "obj2.op()"
3.Additionally, enter "obj2." and hit Ctrl-Space
Comment 1 Ingo Rau CLA 2011-09-28 07:47:51 EDT
Created attachment 204167 [details]
bug-1.js: Where the class and method are defined
Comment 2 Ingo Rau CLA 2011-09-28 07:48:35 EDT
Created attachment 204168 [details]
bug-2.js: Where the variables are used