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

Bug 332481

Summary: InferEngine#visit(IReturnStatement) needs to be updated
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: thatnitind: review+
Target Milestone: 3.2.3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix Patch none

Description Ian Tewksbury CLA 2010-12-13 17:27:18 EST
Right now InferEngine#visit(IReturnStatement) checks if the return statement inferred type is == to the existing inferred return type of the current method.  If it is not then it assumes (except for the JSdoc case) that the method has different return types and thus should have the "any" return type.

Problem with this is in the case of multiple implementations of the InferEngine class for the well known types there will be different instances of the same inferred type, in this case we want to continue to use the inferred type and not set it to ANY
Comment 1 Ian Tewksbury CLA 2010-12-13 17:48:27 EST
Created attachment 185098 [details]
Fix Patch

Fixes issue with new logic.  Logic is a bit confusing but I attempted to doc it very well.

All existing junits pass.
Comment 2 Chris Jaun CLA 2011-01-12 16:11:34 EST
Checked into HEAD and 3.2.3