EA-46646 - IOE: LightElement.add

This commit is contained in:
Anna Kozlova
2013-05-31 14:23:33 +04:00
parent becd937093
commit 5f1745a7d0
4 changed files with 11 additions and 1 deletions
@@ -50,7 +50,7 @@ public class SafeDeleteExtendsClassUsageInfo extends SafeDeleteReferenceUsageInf
final PsiReferenceList extendingImplementsList = myExtendingClass.getImplementsList();
if (extendsList != null) {
final PsiClassType[] referenceTypes = extendsList.getReferencedTypes();
final PsiReferenceList listToAddExtends = refClass.isInterface() == myExtendingClass.isInterface() ? myExtendingClass.getExtendsList() : extendingImplementsList;
final PsiReferenceList listToAddExtends = refClass.isInterface() == myExtendingClass.isInterface() || myExtendingClass instanceof PsiTypeParameter ? myExtendingClass.getExtendsList() : extendingImplementsList;
final PsiClassType[] existingRefTypes = listToAddExtends.getReferencedTypes();
for (PsiClassType referenceType : referenceTypes) {
if (ArrayUtilRt.find(existingRefTypes, referenceType) > -1) continue;
@@ -0,0 +1,3 @@
interface Foo1 {}
interface FooTo<caret>Delete extends Foo1 {}
class TypeParamOwner<B extends FooToDelete> {}
@@ -0,0 +1,3 @@
interface Foo1 {}
class TypeParamOwner<B extends Foo1> {}
@@ -127,6 +127,10 @@ public class SafeDeleteTest extends MultiFileTestCase {
doTest("Super");
}
public void testInterfaceAsTypeParameterBound() throws Exception {
doSingleFileTest();
}
public void testLocalVariableSideEffect() throws Exception {
myDoCompare = false;
try {