Bug 212713

Summary: Bad error message for static block inside an interface
Product: [Eclipse Project] JDT Reporter: Mohsen Saboorian <mohsens>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, jerome_lanneluc, philippe_mulet, srikanth_sankaran
Version: 3.3   
Target Milestone: 3.7 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch under consideration none

Description Mohsen Saboorian CLA 2007-12-12 01:13:27 EST
1. create an interface
2. put a static block inside it
3. see the error message:
	Syntax error, insert "enum Identifier" to complete EnumHeader
Comment 1 Philipe Mulet CLA 2007-12-12 07:12:40 EST
Wondering if we shouldn't be more permissive in our grammar and tolerate static initializers early on, so we can reject them later on; without doing fancy recovery on curly braces.
Comment 2 Srikanth Sankaran CLA 2010-07-06 04:03:17 EDT
Created attachment 173509 [details]
Patch under consideration
Comment 3 Srikanth Sankaran CLA 2010-07-06 04:43:44 EDT
All tests pass, Ayush please review, Thanks in advance.
Comment 4 Ayushman Jain CLA 2010-07-07 01:46:14 EDT
Patch looks good.
Comment 5 Srikanth Sankaran CLA 2010-07-07 01:59:28 EDT
Released in HEAD for 3.7 M1
Comment 6 Ayushman Jain CLA 2010-08-03 09:26:31 EDT
Verified for 3.7M1 using build I20100802-1800.