Bug 84791 - [1.5][compiler] eclipse doesn't allow types to be derived from annotation types
Summary: [1.5][compiler] eclipse doesn't allow types to be derived from annotation types
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-09 11:22 EST by Jon Nall CLA
Modified: 2005-02-15 07:46 EST (History)
0 users

See Also:


Attachments
Testcase (881 bytes, text/x-java)
2005-02-09 11:22 EST, Jon Nall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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