Bug 269986

Summary: [1.5][compiler] eclipse-compiler diffs to javac - misses a bug with generic and wildcard
Product: [Eclipse Project] JDT Reporter: kurt <kurt2002>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: aleherb+eclipse, jarthana, Olivier_Thomann, srikanth_sankaran
Version: 3.4.1   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
java-source to show the bug none

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.