Bug 162056 - [recovery] Confusing errors in editor
Summary: [recovery] Confusing errors in editor
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M3   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-24 08:00 EDT by Philipe Mulet CLA
Modified: 2006-10-30 15:06 EST (History)
0 users

See Also:


Attachments
Proposed fix (6.95 KB, patch)
2006-10-25 03:46 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2006-10-24 08:00:29 EDT
Build 3.2.1

Errors presented for this testcase (all in one file) are totally confusing.
In particular, all correct types are underlined in red, though they are ok, and only missing token is last class name.

interface Irrelevant {}
interface I {
Object foo(Number n);
}
interface J extends I {
String foo(Number n);
}
interface K {
Object foo(Number n);
}
public class {
void foo() {

}
}
Comment 1 David Audel CLA 2006-10-25 03:46:28 EDT
Created attachment 52649 [details]
Proposed fix
Comment 2 David Audel CLA 2006-10-25 03:55:15 EDT
Released for 3.3 M3.

Tests added
  DietRecoveryTest#test118() -> test119()

The class without name is ignored by th recovery and the method inside is added to the last type of the compilation unit K. the } of K is considered as an initiliazer.
There is two problems:
- the position of this initializer isn't correct
- the initializer must not be added inside an interface
Comment 3 Olivier Thomann CLA 2006-10-30 15:06:15 EST
Verified for 3.3 M3 using warm-up build I20061030-0800