Bug 170064 - [1.5] [compiler] Unchecked cast warning reported when javac reports inconvertible error
[1.5] [compiler] Unchecked cast warning reported when javac reports inconvert...
Status: RESOLVED DUPLICATE of bug 322531
Product: JDT
Classification: Eclipse
Component: Core
3.3
PC Windows XP
: P3 normal (vote)
: ---
Assigned To: Srikanth Sankaran CLA Friend
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-01-10 05:08 EST by Jerome Lanneluc CLA Friend
Modified: 2011-06-03 03:10 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 Jerome Lanneluc CLA Friend 2007-01-10 05:08:04 EST
I20061219-1300

From the newsgroup, the following test case triggers an unchecked cast warning with Eclipse compiler, whereas javac 1.5 reports an inconvertible types error.

public class Test {

	public static class Foo<T>{
	}

	public static class Bar<T> extends Foo<T>{
	}

	public <Z,E extends Foo<Z>> Class<E> test(){
		return (Class<E>) Bar.class;
	}

}
Comment 1 Philipe Mulet CLA Friend 2007-01-10 06:24:29 EST
Similar situation to bug 148046.
Comment 2 Srikanth Sankaran CLA Friend 2010-11-03 03:20:21 EDT
I'll follow up on this.
Comment 3 Srikanth Sankaran CLA Friend 2011-06-03 03:10:54 EDT
Same issue as bug 322531

*** This bug has been marked as a duplicate of bug 322531 ***