mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
isAssignable (IDEA-97276)
This commit is contained in:
@@ -911,7 +911,7 @@ public class TypeConversionUtil {
|
||||
PsiSubstitutor leftSubstitutor = leftResult.getSubstitutor();
|
||||
|
||||
if (!leftClass.getManager().areElementsEquivalent(leftClass, rightClass)) {
|
||||
if (!allowUncheckedConversion && PsiUtil.isRawSubstitutor(leftClass, leftSubstitutor) && !rightClass.hasTypeParameters()) return false;
|
||||
if (!allowUncheckedConversion && PsiUtil.isRawSubstitutor(leftClass, leftSubstitutor) && !rightClass.hasTypeParameters() && !(rightClass instanceof PsiTypeParameter)) return false;
|
||||
rightSubstitutor = getSuperClassSubstitutor(leftClass, rightClass, rightSubstitutor);
|
||||
rightClass = leftClass;
|
||||
}
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
interface Interf<X extends Interf> {}
|
||||
class SomeClass {
|
||||
static <I extends Interf<? super I>> Class<I> someMethod(I i) { return null; }
|
||||
}
|
||||
@@ -204,6 +204,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testParameterizedParameterBound() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testInstanceClassInStaticContextAccess() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testFlattenIntersectionType() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testIDEA97276() throws Exception { doTest17Incompatibility(false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user