intersection of empty types is widest possible type (Any?)
This commit is contained in:
@@ -140,7 +140,9 @@ public class TypeUtils {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static JetType intersect(@NotNull JetTypeChecker typeChecker, @NotNull Set<JetType> types) {
|
public static JetType intersect(@NotNull JetTypeChecker typeChecker, @NotNull Set<JetType> types) {
|
||||||
assert !types.isEmpty();
|
if (types.isEmpty()) {
|
||||||
|
return JetStandardClasses.getNullableAnyType();
|
||||||
|
}
|
||||||
|
|
||||||
if (types.size() == 1) {
|
if (types.size() == 1) {
|
||||||
return types.iterator().next();
|
return types.iterator().next();
|
||||||
|
|||||||
Reference in New Issue
Block a user