Bug 39865 - Misleading error diagnosis on broken method signatures
Summary: Misleading error diagnosis on broken method signatures
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-10 08:21 EDT by Philipe Mulet CLA
Modified: 2003-08-28 04:45 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.