mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
pull up: postpone type params replacement: substituted types can contain type params from base class with names that exist in current class (IDEA-87543)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
interface Bar<T> { }
|
||||
|
||||
interface Base<T> { }
|
||||
|
||||
class Foo<T,U> implements Base<U> {
|
||||
void fo<caret>o(Bar<U> bar) { }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
interface Bar<T> { }
|
||||
|
||||
interface Base<T> {
|
||||
void foo(Bar<T> bar);
|
||||
}
|
||||
|
||||
class Foo<T,U> implements Base<U> {
|
||||
@Override
|
||||
public void foo(Bar<U> bar) { }
|
||||
}
|
||||
@@ -115,6 +115,10 @@ public class PullUpTest extends LightRefactoringTestCase {
|
||||
doTest(false, new RefactoringTestUtil.MemberDescriptor("I", PsiClass.class));
|
||||
}
|
||||
|
||||
public void testTypeParamsConflictingNames() throws Exception {
|
||||
doTest(false, new RefactoringTestUtil.MemberDescriptor("foo", PsiMethod.class));
|
||||
}
|
||||
|
||||
private void doTest(RefactoringTestUtil.MemberDescriptor... membersToFind) throws Exception {
|
||||
doTest(true, membersToFind);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user