Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331473 - Inference mixin support broken
Summary: Inference mixin support broken
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Ian Tewksbury CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: WI44838
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 15:45 EST by Ian Tewksbury CLA
Modified: 2010-12-15 23:19 EST (History)
1 user (show)

See Also:
cmjaun: review+
thatnitind: review+


Attachments
Fix Patch with JUnits (33.03 KB, patch)
2010-11-30 15:49 EST, Ian Tewksbury CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2010-11-30 15:45:52 EST
The support/API for being able to mix in one inferred type into another one does not work.

Attaching fix and updated JUnits to fix support.

This is needed for an adopter product that leverages this existing but broken API.
Comment 1 Ian Tewksbury CLA 2010-11-30 15:49:11 EST
Created attachment 184181 [details]
Fix Patch with JUnits

Suggested fix with updated JUnits.
Comment 2 Ian Tewksbury CLA 2010-11-30 16:04:00 EST
For those looking for more detail:

InferEngine was updated to deal with the following type definition:

foo = function() {
this.cool = 42;
}

InferredType#addMixin was documented and the parameters clarified

CompletionEngine was updated not to access mixins directly because now they should be mixed into the inferred type at binding time.

Updated SourceElementParser to notify on anonymous inferred types even if they are not ObjectLiterals.

Updated ClassScope#connectMixins to do the mixing of inferred types correctly

Updated SourceTypeBinding to not access mixins directly because the mixing in has already been done.
Comment 3 Ian Tewksbury CLA 2010-11-30 16:11:24 EST
There are also a couple changes in InferEngine to be sure I didn't break Chris's changes for Bug 324874.
Comment 4 Ian Tewksbury CLA 2010-12-15 14:38:16 EST
Thanks for the review guys!
Comment 5 Nitin Dahyabhai CLA 2010-12-15 15:56:55 EST
Committed to HEAD.
Comment 6 Ian Tewksbury CLA 2010-12-15 16:36:50 EST
(In reply to comment #5)
> Committed to HEAD.
What about 3.2.3?
Comment 7 Chris Jaun CLA 2010-12-15 17:04:43 EST
Checked into 3.2.3 and HEAD.