mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
eleminate wildcards in extends/implements lists (IDEA-82093)
This commit is contained in:
@@ -51,7 +51,7 @@ public class ExtendsListFix extends LocalQuickFixAndIntentionActionOnPsiElement
|
||||
super(aClass);
|
||||
myClassToExtendFrom = classToExtendFrom;
|
||||
myToAdd = toAdd;
|
||||
myTypeToExtendFrom = typeToExtendFrom;
|
||||
myTypeToExtendFrom = (PsiClassType)GenericsUtil.eliminateWildcards(typeToExtendFrom);
|
||||
|
||||
@NonNls final String messageKey;
|
||||
if (classToExtendFrom != null && aClass.isInterface() == classToExtendFrom.isInterface()) {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// "Make 'a' implement 'b'" "true"
|
||||
interface b<T> {
|
||||
void f(T t);
|
||||
}
|
||||
|
||||
class a implements b<Integer> {
|
||||
public void f(Integer integer) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class X {
|
||||
void h(b<? super Integer> i) {
|
||||
|
||||
}
|
||||
|
||||
void g() {
|
||||
h(new a());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// "Make 'a' implement 'b'" "true"
|
||||
interface b<T> {
|
||||
void f(T t);
|
||||
}
|
||||
|
||||
class a {}
|
||||
|
||||
class X {
|
||||
void h(b<? super Integer> i) {
|
||||
|
||||
}
|
||||
|
||||
void g() {
|
||||
h(new a<caret>());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user