Bug 108045 - [compiler][1.5] unhelpful error message on bad generic inheritance
Summary: [compiler][1.5] unhelpful error message on bad generic inheritance
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-25 16:00 EDT by Adam Kiezun CLA
Modified: 2006-04-12 12:52 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2005-08-25 16:00:08 EDT
3.1
here's a case where eclipse generates 5 errors for 1 mistake and all are not
very helpful. When it happened to me I ran javac to understand what's going on.
They show 1 message and it tells you exactly what's wrong.

public class A<T0> extends ArrayList<T0> implements I<T0>{
}
interface I<T1> extends Collection{	
}

Eclipse error message (1 of 5):
Name clash: The method addAll(Collection<? extends E>) of type ArrayList<T0> has
the same erasure as addAll(Collection<? extends E>) of type Collection but does
not override it	

javac error message (1 of 1):
java.util.Collection cannot be inherited with different arguments: <> and <T0>
public class A<T0> extends ArrayList<T0> implements I<T0>{
^
Comment 1 Philipe Mulet CLA 2006-04-12 12:52:51 EDT
Works fine in latest, added GenericTypeTest#test0968