diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowInfo.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowInfo.java index ae279347d03..1a2c0b66546 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowInfo.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowInfo.java @@ -17,15 +17,23 @@ package org.jetbrains.jet.lang.resolve.calls.autocasts; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.SetMultimap; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.types.JetType; +import java.util.Map; import java.util.Set; public interface DataFlowInfo { DataFlowInfo EMPTY = new DelegatingDataFlowInfo(null, ImmutableMap.of(), DelegatingDataFlowInfo.newTypeInfo()); + @NotNull + Map getCompleteNullabilityInfo(); + + @NotNull + SetMultimap getCompleteTypeInfo(); + @NotNull Nullability getNullability(@NotNull DataFlowValue key); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowValue.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowValue.java index 3bf2405ca94..f878e269088 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowValue.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DataFlowValue.java @@ -17,6 +17,7 @@ package org.jetbrains.jet.lang.resolve.calls.autocasts; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; import org.jetbrains.jet.lang.types.JetType; @@ -38,6 +39,11 @@ public class DataFlowValue { this.immanentNullability = immanentNullability; } + @Nullable + public Object getId() { + return id; + } + @NotNull public Nullability getImmanentNullability() { return immanentNullability; diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DelegatingDataFlowInfo.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DelegatingDataFlowInfo.java index f86992ebc1e..4c63b410192 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DelegatingDataFlowInfo.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/autocasts/DelegatingDataFlowInfo.java @@ -51,8 +51,9 @@ import static org.jetbrains.jet.lang.resolve.calls.autocasts.Nullability.NOT_NUL this.typeInfo = typeInfo; } + @Override @NotNull - private Map getCompleteNullabilityInfo() { + public Map getCompleteNullabilityInfo() { Map result = Maps.newHashMap(); DelegatingDataFlowInfo info = this; while (info != null) { @@ -68,8 +69,9 @@ import static org.jetbrains.jet.lang.resolve.calls.autocasts.Nullability.NOT_NUL return result; } + @Override @NotNull - private SetMultimap getCompleteTypeInfo() { + public SetMultimap getCompleteTypeInfo() { SetMultimap result = newTypeInfo(); DelegatingDataFlowInfo info = this; while (info != null) {