Bug 8789 - Compiler incorrectly reports that abstract method has a body
Summary: Compiler incorrectly reports that abstract method has a body
Status: RESOLVED DUPLICATE of bug 8384
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-30 16:49 EST by Peter Burka CLA
Modified: 2002-02-11 04:52 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-01-30 16:49:52 EST
Enter the following class into Eclipse and save it:

package foo;
public abstract class Bar {
	public abstract void foo();

	public static void main(String[] args) {

	}
}
}

Two errors will be displayed:
 On the line with 'foo()': 'Abstract methods do not specify a body'
 On the last line: 'Syntax error on token "}", "interface" or "class" expected

The second error is correct.  The first error is completely invalid and very 
misleading.  The line it is on is completely correct.

This is a particularly bad one because the Outline view does not show the 
second error at all -- you can only see it in the text pane.  In a large class 
it may not be obvious that there is a second error.
Comment 1 Philipe Mulet CLA 2002-01-30 18:00:22 EST
Which build number was this in?
Comment 2 Philipe Mulet CLA 2002-01-31 05:53:40 EST
Fix will go into next integration build. I am now only getting one error for 
the extra closing curly brace.

*** This bug has been marked as a duplicate of 8384 ***