Bug 39865

Summary: Misleading error diagnosis on broken method signatures
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2003-07-10 08:21:13 EDT
Build 20030703

On following source (missing first parameter name),

public class X {
	public void foo(X, Object o, String s) {
	}
}
	
The inferred syntax errors are not helpful:

Syntax error, insert "}" to complete ClassBody            line 4
Syntax error on token ",", ; expected                     line 4
Syntax error on token ",", . expected                     line 4	
Syntax error on token "(", { expected after this token    line 4
Syntax error on token ")", ; expected                     line 4
Syntax error on tokens, delete these tokens               line 4
Comment 1 Philipe Mulet CLA 2003-07-10 08:23:29 EDT
Body start is placed on first opening parenthesis since rest of the signature 
is broken. This interferes with diet/body dual diagnosis. 

When diagnosing incorrect signatures, it should provide the entire method 
declaration, leaving the diagnosis processing it. Then no subsequent diagnosis 
should occur when parsing the method body (and it should simply skip it then).
Comment 2 David Audel CLA 2003-07-15 08:55:05 EDT
Fixed.
Comment 3 David Audel CLA 2003-08-28 04:45:28 EDT
Verified.