Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362403 - [content assist] assigning a property to a function makes it no longer being considered a function
Summary: [content assist] assigning a property to a function makes it no longer being ...
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-29 11:10 EDT by Philippe Marschall CLA
Modified: 2013-06-19 11:10 EDT (History)
0 users

See Also:


Attachments
test case (688 bytes, application/x-javascript)
2011-10-29 11:11 EDT, Philippe Marschall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Marschall CLA 2011-10-29 11:10:17 EDT
Build Identifier: M20110909-1335

As soon as you add the property to a function the type inferencer does no longer seem to consider it a function but an object.

See the attached JS file.
- First we define a type ("jQueryObject")
- Then we add a property to the type ("add")
- then we define a function that returns this type ("jQuery")

At this point we get content assist on the return value. For example
jQuery("a").
proposes "add"

However once we add a property ("boxModel") to the function we no longer get content assist on
jQuery("a").

Reproducible: Always

Steps to Reproduce:
1. Define a function that returns a type
2. You should get autocompletion on the return value of the function
3. Add a property to the function
4. You no longer get autocompletion on the return value of the function
Comment 1 Philippe Marschall CLA 2011-10-29 11:11:50 EDT
Created attachment 206166 [details]
test case