Data flow values refactoring: removed DataFlowValue.kind.isStable, renamed DataFlowValue.isPredictable -> DataFlowValue.isStable

This commit is contained in:
Mikhail Glukhikh
2016-07-27 16:16:38 +03:00
parent 915e36cb02
commit 6e391854a0
22 changed files with 70 additions and 75 deletions
@@ -81,7 +81,7 @@ object RuntimeAssertionsTypeChecker : AdditionalTypeChecker {
expressionType,
object : RuntimeAssertionInfo.DataFlowExtras {
override val canBeNull: Boolean
get() = c.dataFlowInfo.getPredictableNullability(dataFlowValue).canBeNull()
get() = c.dataFlowInfo.getStableNullability(dataFlowValue).canBeNull()
override val possibleTypes: Set<KotlinType>
get() = c.dataFlowInfo.getCollectedTypes(dataFlowValue)
override val presentableText: String
@@ -46,7 +46,7 @@ object ProtectedSyntheticExtensionCallChecker : CallChecker {
if (resolvedCall.dispatchReceiver != null && resolvedCall.extensionReceiver !is ReceiverValue) return
val receiverValue = resolvedCall.extensionReceiver as ReceiverValue
val receiverTypes = listOf(receiverValue.type) + context.dataFlowInfo.getPredictableTypes(
val receiverTypes = listOf(receiverValue.type) + context.dataFlowInfo.getStableTypes(
DataFlowValueFactory.createDataFlowValue(receiverValue, context.trace.bindingContext, context.scope.ownerDescriptor)
)