Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 382355

Summary: [1.8][compiler] Compiler accepts erroneous default method
Product: [Eclipse Project] JDT Reporter: Srikanth Sankaran <srikanth_sankaran>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.8   
Target Milestone: BETA J8   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 383966    

Description Srikanth Sankaran CLA 2012-06-12 08:33:05 EDT
BETA_JAVA8:

The following program should be rejected since an default method is never
allowed to be override-equivalent with a public instance method of the 
class Object (as it is pointless since it will never be chosen for dispatch
ever). It is not rejected as of now.

//----------
interface I {
  public String toString () default { return "";}
}
Comment 1 Stephan Herrmann CLA 2012-09-02 16:47:42 EDT
Tests & fix have been pushed to BETA_JAVA8 via commit 874cd7abbf7920fe3082baf91be06fbb27247657