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

Bug 331473

Summary: Inference mixin support broken
Product: [WebTools] JSDT Reporter: Ian Tewksbury <itewksbu>
Component: GeneralAssignee: Ian Tewksbury <itewksbu>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun
Version: 3.2.3Flags: cmjaun: review+
thatnitind: review+
Target Milestone: 3.2.3   
Hardware: All   
OS: All   
Whiteboard: WI44838
Attachments:
Description Flags
Fix Patch with JUnits none

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.