Bug 227530

Summary: [1.5][compiler] Incomplete error message for annotation inside a member type
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.4   
Target Milestone: 3.5 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch with testcase none

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.