Bug 79848 - [1.5][annot] Array of java.lang.Class is a legal value for the type of an annotation type member declaration
Summary: [1.5][annot] Array of java.lang.Class is a legal value for the type of an ann...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-30 23:38 EST by Olivier Thomann CLA
Modified: 2004-12-14 22:48 EST (History)
0 users

See Also:


Attachments
Apply on HEAD (1.26 KB, patch)
2004-11-30 23:45 EST, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-11-30 23:38:13 EST
Using latest the following code reports an error:

@interface I {
    Class[] classes();
}
class Y {}

public class X {
    @I(classes = {X.class}) public void foo(){
    }
}

----------
1. ERROR in c:\tests_sources\X.java (at line 7)
	@I(classes = {X.class}) public void foo(){
	             ^^^^^^^^^
The value for annotation attribute I.classes must be a class literal
----------
1 problem (1 error)

Array of java.lang.Class are legal values for the type of an annotation typoe
member declaration.
Comment 1 Olivier Thomann CLA 2004-11-30 23:45:39 EST
Created attachment 16243 [details]
Apply on HEAD
Comment 2 Philipe Mulet CLA 2004-12-01 05:10:54 EST
Integrated patch.
Regression test: AnnotationTest#test065
Fixed
Comment 3 Olivier Thomann CLA 2004-12-14 22:48:46 EST
Verified in 200412140800