Bug 113710

Summary: Eclipse show an error for valid code
Product: [Eclipse Project] JDT Reporter: John Liu <john.liu>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1.1   
Target Milestone: 3.1.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Liu CLA 2005-10-25 16:48:07 EDT
The code below produces an error although the Java 5.0 compiler and 3.1 release 
of elcipse does not.

import java.awt.Graphics2D;
import java.awt.Shape;

public class TestClass<V extends DrawObject> {

   /** Base object for wrapping */
   protected V draw;

   /**
    * Draw the object with its attached text
    * 
    * @param graphics the graphics object to draw into
    */
   public void draw( Graphics2D graphics ) {
      draw.draw(graphics);
   }
}

abstract class DrawObject implements Drawable {

   protected void draw( Graphics2D graphics, Shape shape ) {
   }
}

interface Drawable {

   void draw( Graphics2D graphics );
}
Comment 1 Olivier Thomann CLA 2005-10-25 20:33:45 EDT
Closing as a duplicate of bug 112109.
Added org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test859

*** This bug has been marked as a duplicate of 112109 ***
Comment 2 Frederic Fusier CLA 2006-01-10 08:00:06 EST
Verified for 3.1.2 using build M20060109-1200.