Bug 200026 - [1.5][compiler] compiler message on incomplete enum declarations
Summary: [1.5][compiler] compiler message on incomplete enum declarations
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 102590
  Show dependency tree
 
Reported: 2007-08-15 08:55 EDT by Martin Aeschlimann CLA
Modified: 2007-10-29 05:19 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2007-08-15 08:55:47 EDT
3.3

In the following code:
package org.hello;
enum TestEnum {
	A {
		
	},
	B ;
	public abstract boolean foo();
}
there's an error on the opening bracket of test 'A {' saying:
'The type new TestEnum(){} must implement the inherited abstract method TestEnum.foo()'

I think its strange to talk about a type 'new TestEnum' here.
Wouldn't it be better to say:
'The enum constant 'A' must must implement the abstract method foo()'.

It would also be good to put the error location on 'A', not on the bracket.
See also bug 200016 for the message on 'foo'.
Comment 1 Philipe Mulet CLA 2007-10-10 05:21:47 EDT
Technically, we treat it as an anonymous type (which it really is). I agree this is suboptimal for user perception.
Comment 2 Kent Johnson CLA 2007-10-12 13:32:12 EDT
See bug 200016

Released into HEAD for 3.4M3
Comment 3 Frederic Fusier CLA 2007-10-29 05:19:29 EDT
Verified for 3.4M3 using I20071029-0010 build.