Bug 269986 - [1.5][compiler] eclipse-compiler diffs to javac - misses a bug with generic and wildcard
Summary: [1.5][compiler] eclipse-compiler diffs to javac - misses a bug with generic a...
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 11:35 EDT by kurt CLA
Modified: 2009-04-28 09:23 EDT (History)
4 users (show)

See Also:


Attachments
java-source to show the bug (1.96 KB, text/plain)
2009-03-25 11:35 EDT, kurt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description kurt CLA 2009-03-25 11:35:04 EDT
Created attachment 129849 [details]
java-source to show the bug

Build ID: M20080911-1700

Steps To Reproduce:
1. compile attached class with eclipse-compiler
2. compile attached class with javac
3. javac states am error at line 52 - eclipse states ok


More information:
using Eclipse 3.4.1
Java 1.6.0_11
Comment 1 Anton Leherbauer CLA 2009-03-26 07:56:17 EDT
Moving to JDT Core.
Comment 2 Kent Johnson CLA 2009-03-26 12:17:06 EDT
This has been fixed in 3.5

FYI, the problematic method is :

interface J<T> extends Comparable<J<T>> {
	int getSize();
	T getField();
}
class X {
	<T extends J<?>> int x(T t1, T t2) {
		return t1.compareTo(t2);
	}
}

This compareTo() call compiled without error in javac 1.5, but now reports an error with javac 6.0.

Our compiler also reports an error in 3.5
Comment 3 Kent Johnson CLA 2009-03-26 12:23:46 EDT
Actually this was fixed in 3.4.2
Comment 4 Jay Arthanareeswaran CLA 2009-04-28 02:08:36 EDT
Verified for 3.5M7 using I20090426-2000 also.