diagnose invalid type (EA-39254)

This commit is contained in:
peter
2012-09-24 18:12:17 +02:00
parent 585ac67f40
commit 2d9d8ff112

View File

@@ -19,7 +19,6 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Key;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.psi.util.PsiUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -67,6 +66,7 @@ public class PsiWildcardType extends PsiType {
public static PsiWildcardType changeBound(@NotNull PsiWildcardType type, @NotNull PsiType newBound) {
LOG.assertTrue(type.getBound() != null);
LOG.assertTrue(newBound.isValid());
if (type.myIsExtending) {
if (newBound.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
return createUnbounded(type.myManager);