make type parameter implements interface: don't insert any methods in code

This commit is contained in:
Anna Kozlova
2017-09-06 10:53:09 +03:00
parent 9c9f66e72e
commit 18d71a7378
3 changed files with 21 additions and 1 deletions
@@ -44,7 +44,7 @@ public class OverrideImplementExploreUtil {
Map<MethodSignature, PsiMethod> finals = new LinkedHashMap<>();
Map<MethodSignature, PsiMethod> concretes = new LinkedHashMap<>();
if (aClass.isAnnotationType()) return Collections.emptyMap();
if (aClass.isAnnotationType() || aClass instanceof PsiTypeParameter) return Collections.emptyMap();
PsiUtilCore.ensureValid(aClass);
Collection<HierarchicalMethodSignature> allMethodSigs = aClass.getVisibleSignatures();
@@ -0,0 +1,10 @@
// "Make 'T' implement 'b'" "true"
class a<T extends b<String>> {
void f(b<String> r, T t) {
r.g(t);
}
}
interface b<T> {
void g(b<T> t);
}
@@ -0,0 +1,10 @@
// "Make 'T' implement 'b'" "true"
class a<T> {
void f(b<String> r, T t) {
r.g(<caret>t);
}
}
interface b<T> {
void g(b<T> t);
}