intersection of empty types is widest possible type (Any?)

This commit is contained in:
Stepan Koltsov
2012-04-28 17:43:52 +04:00
parent f076ff027d
commit 0073959224
@@ -140,7 +140,9 @@ public class TypeUtils {
@Nullable
public static JetType intersect(@NotNull JetTypeChecker typeChecker, @NotNull Set<JetType> types) {
assert !types.isEmpty();
if (types.isEmpty()) {
return JetStandardClasses.getNullableAnyType();
}
if (types.size() == 1) {
return types.iterator().next();