Bug 107098 - [1.5][compiler] method override check fails with instantiated type parameter in bound
Summary: [1.5][compiler] method override check fails with instantiated type parameter ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-16 06:00 EDT by Markus Keller CLA
Modified: 2005-09-26 11:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.