Bug 84791

Summary: [1.5][compiler] eclipse doesn't allow types to be derived from annotation types
Product: [Eclipse Project] JDT Reporter: Jon Nall <nall>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Testcase none

Description Jon Nall CLA 2005-02-09 11:22:21 EST
The JLS3 states on page 272:

A consequence of the fact that an annotation type cannot explicitly declare a
superclass or superinterface is that a subclass or subinterface of an annotation
type is never itself an annotation type. Similarly, annotation.Annotation is not
itself an annotation type.

Attached is a file containing examples of an interface extending an annotation
type and a class implementing an annotation type. javac compiles this file
without error.

I'm using eclipse:
Version: 3.1.0
Build id: I20050202-0800
Comment 1 Jon Nall CLA 2005-02-09 11:22:53 EST
Created attachment 17787 [details]
Testcase
Comment 2 Philipe Mulet CLA 2005-02-09 12:28:32 EST
Indeed we are a bit to strict.
Comment 3 Philipe Mulet CLA 2005-02-09 12:28:59 EST
Added AnnotationTest#test110.
Comment 4 Philipe Mulet CLA 2005-02-09 12:37:58 EST
Fixed in latest; we now tolerate annotation types where we allow super interfaces.
Comment 5 Jerome Lanneluc CLA 2005-02-15 07:46:10 EST
Verified in I20050214