Bug 94759

Summary: [1.5][compiler] @Override doesn't report an error inside interface when specified for clone() method
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mlists
Version: 3.1   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch for MethodDeclaration
none
Patch for AnnotationTest none

Description Olivier Thomann CLA 2005-05-11 11:41:08 EDT
Related to bug 90484, the following code reports an error when compiled with
javac, but compiles fine using Eclipse.

public interface I {
	@Override I clone();
}

if clone() is replaced with foo() then we report the same error as javac.
Comment 1 Philipe Mulet CLA 2005-06-20 18:13:04 EDT
Fix is trivial, interface methods should not tolerate @Override annotations.
Comment 2 Philipe Mulet CLA 2005-06-20 18:14:39 EDT
Added AnnotationTest#test168
Comment 3 Philipe Mulet CLA 2005-06-21 04:27:24 EDT
Created attachment 23596 [details]
Patch for MethodDeclaration
Comment 4 Philipe Mulet CLA 2005-06-21 04:28:02 EDT
Created attachment 23597 [details]
Patch for AnnotationTest
Comment 5 Kent Johnson CLA 2005-06-21 13:53:17 EDT
I would not put this fix into RC4 since its basically an error test case.
Comment 6 Philipe Mulet CLA 2005-06-21 13:58:36 EDT
I did put it onto the list as the fix was trivial.
Comment 7 Philipe Mulet CLA 2005-06-29 04:11:39 EDT
Fixed in 3.1 maintenance branch
Comment 8 Maxime Daniel CLA 2005-08-09 07:30:55 EDT
Verified in 3.2 M1 with build I20050808-2000.
Comment 9 David Audel CLA 2005-09-26 09:26:27 EDT
Verified using M20050923-1430 for 3.1.1