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

Bug 428305

Summary: [1.8][compiler] Various loose ends in Diamond inference implementation
Product: [Eclipse Project] JDT Reporter: Srikanth Sankaran <srikanth_sankaran>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, noopur_gupta, stephan.herrmann
Version: 4.4   
Target Milestone: BETA J8   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 427787    

Description Srikanth Sankaran CLA 2014-02-16 15:14:24 EST
Using this CR as the home, I'll shortly release a patch that fixes a bunch of 
loose ends with the present synthetic static factory based <> inference. Many
of these problems show up while building JRE8 from source zip.

Basically, 

    - Type variables from enclosing types are not handled correctly.
    - Rawness of enclosing type is lost (static nested generic class sees its
      outer as raw.)
    - Certain scenarios result in NPEs while diagnosing redundant type 
      argument specification.
    - Outer rawness gets dropped during substitutions
    - Static factory method's return type is not encoded properly.

These problems do not affect the most common scenarios, but are important
enough to fix because these impact the inference in non so uncommon scenarios.
Comment 1 Srikanth Sankaran CLA 2014-02-16 15:15:22 EST
I should call out that these are issues in the existing (1.7) implementation
carried over to 1.8.
Comment 3 Noopur Gupta CLA 2014-02-21 05:52:39 EST
Verified as working for Eclipse + Java 8 RC1 using Kepler SR2(RC4) +   
Eclipse Java Development Tools Patch for Java 8 Support (BETA)	
1.0.0.v20140220-2054 using the test case changes.