Bug 31261

Summary: Strange behavior when there is more errors than max errors per compilation unit
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description David Audel CLA 2003-02-07 07:42:28 EST
1) Create a class X.java
public class X {
  {#} // error 1
  {#} // error 2
  {#} // error 3
  {#} // error 4
}
2) Limit the number of errors reported per compilation unti to 3
3) do a full build
There is only 3 errors (as expected), but it is errors 1, 2 and 4.
It should be errors 1, 2 and 3.
Comment 1 David Audel CLA 2003-02-07 07:57:15 EST
The problem is in TypeDeclaration#parseMethod(). Initializers are parsed from 
the last to the first. The error in the last initializer is considered as the 
first error in the type context.

Fixed.
Comment 2 David Audel CLA 2003-03-04 11:16:00 EST
Verified.