Avoid putting trivial information into DelegatingDataFlowInfo map
This commit is contained in:
+5
-2
@@ -366,13 +366,16 @@ internal class DelegatingDataFlowInfo private constructor(
|
||||
updatedNullabilityInfo.entries.fold(
|
||||
parent?.completeNullabilityInfo ?: EMPTY_NULLABILITY_INFO
|
||||
) { result, (dataFlowValue, nullability) ->
|
||||
result.put(dataFlowValue, nullability)
|
||||
if (dataFlowValue.immanentNullability != nullability)
|
||||
result.put(dataFlowValue, nullability)
|
||||
else
|
||||
result.remove(dataFlowValue)
|
||||
}
|
||||
|
||||
var resultingTypeInfo = parent?.completeTypeInfo ?: EMPTY_TYPE_INFO
|
||||
|
||||
valueToClearPreviousTypeInfo?.let {
|
||||
resultingTypeInfo = resultingTypeInfo.put(it, ImmutableLinkedHashSet.empty())
|
||||
resultingTypeInfo = resultingTypeInfo.remove(it)
|
||||
}
|
||||
|
||||
for ((value, types) in updatedTypeInfo) {
|
||||
|
||||
Reference in New Issue
Block a user