[FE 1.0] Don't throw empty intersection exception, return empty intersection type instead
This commit is contained in:
committed by
teamcity
parent
a798fe0b18
commit
5b5da025f4
@@ -29,6 +29,7 @@ import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderImpl;
|
||||
import org.jetbrains.kotlin.types.checker.KotlinTypeChecker;
|
||||
import org.jetbrains.kotlin.types.error.ErrorTypeKind;
|
||||
import org.jetbrains.kotlin.types.error.ErrorUtils;
|
||||
import org.jetbrains.kotlin.types.typeUtil.TypeUtilsKt;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -124,7 +125,7 @@ public class TypeIntersector {
|
||||
}
|
||||
|
||||
if (bestRepresentative == null) {
|
||||
throw new AssertionError("Empty intersection for types " + types);
|
||||
return null;
|
||||
}
|
||||
return TypeUtils.makeNullableAsSpecified(bestRepresentative, allNullable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user