Bug 107098

Summary: [1.5][compiler] method override check fails with instantiated type parameter in bound
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 3.2   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-08-16 06:00:56 EDT
I20050811-1530 + jdt.core v_606

class A<T> {
    <S extends T> void foo2(Number t, S s) { System.out.println("A"); }
}

class B extends A<Number> {
    @Override //eclipse: foo2(..) must override a superclass method
    <S extends Number> void foo2(Number t, S s) { System.out.println("B"); }
}

public class Test {
    public static void main(String[] args) {
        B b= new B();
        b.foo2(1, 10); //eclipse: ambiguous
        A<Number> a= b;
        a.foo2(2, 20);
    }
}

Javac 1.5.0_04 gives no errors, which seems correct.
Comment 1 Kent Johnson CLA 2005-09-19 13:26:25 EDT
fixed & released in 3.1.1 stream
Comment 2 Kent Johnson CLA 2005-09-19 13:32:00 EDT
Added MethodVerify test067
Comment 3 Kent Johnson CLA 2005-09-19 14:54:12 EDT
released in 3.2 HEAD stream
Comment 4 Maxime Daniel CLA 2005-09-21 10:18:07 EDT
Verified for 3.2 M2 with build I20050920-0010.
Comment 5 Olivier Thomann CLA 2005-09-26 11:09:52 EDT
Verified for 3.1.1 using M20050923-1430.