Bug 227530 - [1.5][compiler] Incomplete error message for annotation inside a member type
Summary: [1.5][compiler] Incomplete error message for annotation inside a member type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-17 07:46 EDT by David Audel CLA
Modified: 2008-10-27 08:07 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch with testcase (2.67 KB, patch)
2008-10-03 12:14 EDT, Kent Johnson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2008-04-17 07:46:43 EDT
build I20080415-1646

public class X {
	class Y {
		@interface E {
			
		}
	}
}

The error message is 'The member annotation E can only be defined inside a top-level class or interface'.
But it is also possible to define an annotation inside a static member type.
Comment 1 Kent Johnson CLA 2008-09-12 15:53:43 EDT
How about :

The member annotation E can only be defined inside a static context

instead of :

The member annotation E can only be defined inside a top-level class or interface


Is that clear enough ?
Comment 2 Kent Johnson CLA 2008-10-03 12:14:13 EDT
Created attachment 114205 [details]
Proposed patch with testcase
Comment 3 Kent Johnson CLA 2008-10-03 12:20:23 EDT
Fix and test released for 3.5M3
Comment 4 David Audel CLA 2008-10-27 08:07:47 EDT
Verified for 3.5M3 using I20081026-2000 build.