Bug 363724 - compile error when clone in interface type-parameter
Summary: compile error when clone in interface type-parameter
Status: VERIFIED DUPLICATE of bug 314556
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 12:01 EST by kurt CLA
Modified: 2011-12-06 07:16 EST (History)
3 users (show)

See Also:


Attachments
test-classes (source) (2.30 KB, application/zip)
2011-11-14 12:03 EST, 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 2011-11-14 12:01:22 EST
Build Identifier: Version: 3.6.2  Build id: M20110210-1200 and Version: 3.8.0  Build id: I20111027-1800

One of the compilers (of 3.6.2 or 3.8M3) seems to be wrong.

Compiler of 3.6.2 gives no error, where compiler of 3.8 (for java 6 and 7) gives the following error on interface-class CloneError:

The inherited method Object.clone() cannot hide the public abstract method in ICloneable	CloneError.java	/J6/src/strange	line 3	Java Problem

My guess:

As the type-parameter in interface CloneError does extend only interfaces, the implicit type-parameter class is java.lang.Object, which has the methode clone() - but defined protected only which is in conflict with one of the declared extending interfaces (ICloneable).

But changing the extends just a little (see NoCloneError_[1-4]) makes the error vanish.

Another guess:

The reported error on CloneError should not be an error at all or the evaluation for the No-interfaces is "not complete".

Will attach my test-classes after I submitted the report.


Reproducible: Always
Comment 1 kurt CLA 2011-11-14 12:03:13 EST
Created attachment 206965 [details]
test-classes (source)
Comment 2 Ayushman Jain CLA 2011-11-14 13:29:24 EST
This was a bug in eclipse compiler which was fixed in 3.7 timeframe. Current behaviour matches javac6 and 7.

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