Bug 107105 - [1.5][compiler] method override check does not detect differences in additional type bounds
Summary: [1.5][compiler] method override check does not detect differences in addition...
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.2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 112499 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-16 07:13 EDT by Markus Keller CLA
Modified: 2006-01-10 07:38 EST (History)
2 users (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 07:13:12 EDT
I20050811-1530 + jdt.core v_606

Ecipse compiles these classes without error, although the methods in B and C
don't override the one from A:

import java.io.Serializable;

class A {
    <S extends Number & Serializable & Runnable > void foo2(S s) { }
}

class B extends A {
    @Override // should error
    <S extends Number & Runnable> void foo2(S s) { }
}

class C extends A {
    @Override // should error
    <S extends Number & Runnable & Cloneable> void foo2(S s) { }
}

class D extends A {
    @Override // correct
    <S extends Number & Runnable & Serializable> void foo2(S s) { }
}
Comment 1 Markus Keller CLA 2005-08-16 07:22:39 EDT
This one should fail too:

interface I extends Runnable, Serializable { }

class E extends A {
    @Override //should error
    <S extends Number & I> void foo2(S s) { }
}
Comment 2 Kent Johnson CLA 2005-10-19 14:51:44 EDT
*** Bug 112499 has been marked as a duplicate of this bug. ***
Comment 3 Kent Johnson CLA 2005-11-09 13:17:59 EST
Added MethodVerify test75-76

Released into HEAD and 3.1.2 stream
Comment 4 Olivier Thomann CLA 2005-12-13 10:06:20 EST
Verified for 3.2M4 in I20051212-2000
Comment 5 Frederic Fusier CLA 2006-01-10 07:38:28 EST
Verified for 3.1.2 using build M20060109-1200.