Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359212 - [content assist] Function return type lost over multiple files
Summary: [content assist] Function return type lost over multiple files
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 07:46 EDT by Ingo Rau CLA
Modified: 2013-06-19 11:09 EDT (History)
0 users

See Also:


Attachments
bug-1.js: Where the class and method are defined (531 bytes, application/x-javascript)
2011-09-28 07:47 EDT, Ingo Rau CLA
no flags Details
bug-2.js: Where the variables are used (335 bytes, application/x-javascript)
2011-09-28 07:48 EDT, Ingo Rau CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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