Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321548 - Eclipse Helios compiler fails to compile Java class that compiles with Java 6 and 7 compilers
Summary: Eclipse Helios compiler fails to compile Java class that compiles with Java 6...
Status: VERIFIED DUPLICATE of bug 322001
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.6.1   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-03 01:09 EDT by Michael Allman CLA
Modified: 2010-09-14 13:52 EDT (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 Michael Allman CLA 2010-08-03 01:09:49 EDT
Build Identifier: I20100608-0911

Consider the three types:

public interface Interface1<T> {
	public void hello(T greeting);
}

public interface Interface2<T> {
	public int hello(T greeting);
}

public class ErasureTest implements Interface1<String>, Interface2<Double> {
	public void hello(String greeting) {
	}

	public int hello(Double greeting) {
		return 0;
	}
}

The Eclipse 3.6 compiler fails to compile ErasureTest while the Oracle Java 6 compiler and OpenJDK 7 compiler do.

Reproducible: Always
Comment 1 Srikanth Sankaran CLA 2010-08-03 01:22:27 EDT
I believe the code is valid and eclipse behavior is not.
I'll investigate.
Comment 2 Srikanth Sankaran CLA 2010-08-08 23:14:45 EDT
See also bug# 322001
Comment 3 Srikanth Sankaran CLA 2010-08-10 00:48:37 EDT
I have verified that this is a duplicate of
bug 322001. The fix I have developed for the
latter bug also addresses this issue.

I will use the test case here to generate a unit
test for the the other bug.

Closing this as a duplicate of bug 322001
rather than the other way about since there
is a lot of discussion on the other thread.

*** This bug has been marked as a duplicate of bug 322001 ***
Comment 4 Frederic Fusier CLA 2010-08-26 10:43:31 EDT
Verified for 3.6.1 using build M20100825-0800.

I haven't reset the Whiteboard intentionally as I think it would be safe to also verify this test case in HEAD stream (it's slightly different than the test case of bug 322001 comment 0...)
Comment 5 Ayushman Jain CLA 2010-09-14 13:52:28 EDT
Verified for 3.7M2 using build I20100909-1700.