Bug 220780

Summary: [rename] Renaming a Type Does Not Check for Capture by Type Variable
Product: [Eclipse Project] JDT Reporter: Max Schaefer <xiemaisi>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 3.3.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Max Schaefer CLA 2008-02-28 11:55:32 EST
Build ID: M20071023-1652

Steps To Reproduce:
Test case:

  public class A {
    public static void main(String[] args) {
      C<A> b = new D<String>();
    }
  }
  class C<T> { }
  class D<B> extends C<A> { }
  

Renaming class A to B yields the following output:

  public class B {
    public static void main(String[] args) {
      C<B> b = new D<String>();
    }
  }
  class C<T> { }
  class D<B> extends C<B> { }
  

Note the capture of the argument type A by the type variable B: The program is not compilable, since D<String>() can no longer be cast to D<A>, but only to D<String>.

More information:
Comment 1 Eclipse Genie CLA 2020-06-29 16:12:09 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2022-06-30 06:43:02 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.