Bug 301736

Summary: [quick fix] offer downcasting interfaces for a bounded parameter argument
Product: [Eclipse Project] JDT Reporter: Remy Suen <remy.suen>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: markus.kell.r
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Remy Suen CLA 2010-02-03 13:28:33 EST
Build id: I20100202-0800

I would like the quick fix to offer casting 'test' to 'Test' so the copy becomes 'copy((Test) test);'.

public class Test {
	
  static interface TestInterface {}
	
  static <T extends Test> T copy(T t) {
    return null;
  }
	
  static void v(TestInterface test) {
    copy(test);
  }

}