Bug 79666 - [1.5][annot] Default value of annotation type member declaration must be assignment compatible with return type
Summary: [1.5][annot] Default value of annotation type member declaration must be assi...
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-29 10:49 EST by Olivier Thomann CLA
Modified: 2004-12-14 17:52 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-11-29 10:49:58 EST
The default value must be assignment compatible with the return type of an
annotation type member declaration.

@interface I {
    int id () default 10L; 
}

is invalid, but:

@interface I {
    int id () default (int) 0L; 
}
is ok.
Comment 1 Philipe Mulet CLA 2004-11-29 16:30:21 EST
Added support. 
Added regression test: AnnotationTest#test045.
Fixed
Comment 2 Olivier Thomann CLA 2004-12-14 17:52:18 EST
Verified in 200412140800