mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
replace <? extends Object> with <?> during substitution (IDEA-64775)
This commit is contained in:
@@ -19,6 +19,7 @@ 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;
|
||||
@@ -66,6 +67,11 @@ public class PsiWildcardType extends PsiType {
|
||||
|
||||
public static PsiWildcardType changeBound(@NotNull PsiWildcardType type, @NotNull PsiType newBound) {
|
||||
LOG.assertTrue(type.getBound() != null);
|
||||
if (type.myIsExtending) {
|
||||
if (newBound.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
|
||||
return createUnbounded(type.myManager);
|
||||
}
|
||||
}
|
||||
return new PsiWildcardType(type.myManager, type.myIsExtending, newBound);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user