SOE (IDEA-57496)

This commit is contained in:
anna
2012-10-23 19:30:18 +02:00
parent f57c2243d7
commit 229c91c903
3 changed files with 14 additions and 4 deletions

View File

@@ -65,10 +65,8 @@ public class GenericsUtil {
if (type1 instanceof PsiArrayType && type2 instanceof PsiArrayType) {
final PsiType componentType = getLeastUpperBound(((PsiArrayType)type1).getComponentType(),
((PsiArrayType)type2).getComponentType(), manager);
if (componentType != null) {
return componentType.createArrayType();
}
((PsiArrayType)type2).getComponentType(), compared, manager);
return componentType.createArrayType();
}
if (type1 instanceof PsiIntersectionType) {
Set<PsiType> newConjuncts = new LinkedHashSet<PsiType>();

View File

@@ -0,0 +1,11 @@
interface I<T>{}
interface A extends I<A[]>{}
interface B extends I<B[]>{}
abstract class c{
abstract <T> T baz(T x, T y);
void bar(A x, B y){
baz(x, y);
}
}

View File

@@ -169,6 +169,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testIDEA57493() throws Exception { doTest(false); }
public void testIDEA57495() throws Exception { doTest(false); }
public void testIDEA57494() throws Exception { doTest(false); }
public void testIDEA57496() throws Exception { doTest(false); }
public void testInconvertibleTypes() throws Exception { doTest(false); }
public void testIncompatibleReturnType() throws Exception { doTest(false); }
public void testContinueInferenceAfterFirstRawResult() throws Exception { doTest(false); }