mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-124271
This commit is contained in:
+1
-1
@@ -281,7 +281,7 @@ public class JavaGenericsUtil {
|
||||
if (typeParameter == null) return null;
|
||||
PsiClass owner = (PsiClass)typeParameter.getOwner();
|
||||
if (owner == null) return null;
|
||||
PsiSubstitutor superClassSubstitutor = TypeConversionUtil.getClassSubstitutor(owner, aClass, PsiSubstitutor.EMPTY);
|
||||
PsiSubstitutor superClassSubstitutor = TypeConversionUtil.getClassSubstitutor(owner, aClass, substitutor);
|
||||
if (superClassSubstitutor == null) return null;
|
||||
PsiType itemType = superClassSubstitutor.substitute(typeParameter);
|
||||
itemType = substitutor.substitute(itemType);
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
interface Container<T extends Content> extends Iterable<T> {}
|
||||
interface Content {}
|
||||
|
||||
class Main {
|
||||
public static void doSomething(Container container) {
|
||||
for (<error descr="Incompatible types. Found: 'java.lang.Object', required: 'Content'">Content content : container</error>) {}
|
||||
}
|
||||
}
|
||||
@@ -347,6 +347,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA123518() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA64103() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA123338() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
public void testIDEA124271() { 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()));
|
||||
|
||||
Reference in New Issue
Block a user