mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
make normalize return denotable type (IDEA-140528)
This commit is contained in:
@@ -423,7 +423,8 @@ public class PsiImplUtil {
|
||||
return wildcardType.isSuper() ? wildcardType.getBound() : PsiCapturedWildcardType.create(wildcardType, expression);
|
||||
}
|
||||
else {
|
||||
return ((PsiCapturedWildcardType)type).getUpperBound();
|
||||
final PsiType upperBound = ((PsiCapturedWildcardType)type).getUpperBound();
|
||||
return upperBound instanceof PsiWildcardType ? doNormalizeWildcardByPosition(upperBound, expression, toplevel) : upperBound;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
public final <T> T createStableValue(Class<?> aClass) {
|
||||
return (T) createProxy(aClass.getSuperclass());
|
||||
}
|
||||
|
||||
public static <T> T createProxy(final Class<T> superClass) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -504,6 +504,10 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false);
|
||||
}
|
||||
|
||||
public void testRetrieveBoundFromCapturedWildcardUpperBoundOnNormalize() throws Exception {
|
||||
doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false);
|
||||
}
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
assertNotNull(collectionsClass);
|
||||
|
||||
Reference in New Issue
Block a user