Skip to content

Commit 171f8c0

Browse files
committed
Assignment fixed
1 parent ba61c72 commit 171f8c0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/smartcasts/DelegatingDataFlowInfo.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,19 @@ private boolean putNullability(@NotNull Map<DataFlowValue, Nullability> map, @No
111111
return nullability != getNullability(value);
112112
}
113113

114+
@NotNull
115+
private Set<JetType> getDirectlyPossibleTypes(@NotNull DataFlowValue key) {
116+
Set<JetType> theseTypes = typeInfo.get(key);
117+
Set<JetType> types = parent instanceof DelegatingDataFlowInfo ?
118+
Sets.union(theseTypes, ((DelegatingDataFlowInfo)parent).getDirectlyPossibleTypes(key)) :
119+
theseTypes;
120+
return types;
121+
}
122+
114123
@Override
115124
@NotNull
116125
public Set<JetType> getPossibleTypes(@NotNull DataFlowValue key) {
117-
Set<JetType> theseTypes = typeInfo.get(key);
118-
Set<JetType> types = parent == null ? theseTypes : Sets.union(theseTypes, parent.getPossibleTypes(key));
126+
Set<JetType> types = getDirectlyPossibleTypes(key);
119127
if (getNullability(key).canBeNull()) {
120128
return types;
121129
}

0 commit comments

Comments
 (0)