Bug 76601

Summary: [1.5] parameterized types: eclipse incorrectly reports errors
Product: [Eclipse Project] JDT Reporter: alexander.hoeher
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description alexander.hoeher CLA 2004-10-19 16:17:02 EDT
/*
 * Created on 19.10.2004
 *
 */

/**
 * @author ah
 * 
 * Compiles ok with javac 1.5.0-beta3 into a class that can be run. 
 * 
 * Compiles not with eclipse Version: 3.1.0 Build id: 200409240800
 * 
 * eclipse tells you: Bound mismatch: The type SubI
 * <Q>is not a valid substitute for the bounded parameter <E2 extends SuperI 
<E2>>of the type AllegedBoundMismatch <E2>Bound mismatch: The type SubI
 * <Q>is not a valid substitute for the bounded parameter <E2 extends SuperI 
<E2>>of the type AllegedBoundMismatch <E2>
 * 
 *  
 */
public class GenericParamTypeBug
{

    public static void main(String[] args)
    {
        System.out.println("Hello, I'm class " + GenericParamTypeBug.class);
        class AllegedBoundMismatch<E2 extends SuperI<E2>>
        {

        }

        AllegedBoundMismatch<SubI<Q>> trial = new AllegedBoundMismatch<SubI<Q>>
();
    }

}

class Q
{
}

interface SubI<Q> extends SuperI<SubI<Q>> 
{
}

interface SuperI<Q>
{
}
Comment 1 Philipe Mulet CLA 2004-11-02 09:20:54 EST
Resolved type compatibility issues, and inneremulation (enclosing access).
Added regression test: GenericTypeTest#test377
Comment 2 Philipe Mulet CLA 2004-11-02 09:21:11 EST
Fixed
Comment 3 Frederic Fusier CLA 2004-11-04 11:43:23 EST
Verified for 3.1 M3 with build I200411040800