Build fix. The second version of DataFlowInfo.getPossibleTypes returning also the original type added and used.

This commit is contained in:
Mikhail Glukhikh
2015-04-17 11:49:44 +03:00
parent 6421f48c07
commit 86bb0d5bc5
5 changed files with 31 additions and 10 deletions
@@ -657,7 +657,7 @@ private fun ExtractionData.inferParametersInfo(
receiverToExtract is ThisReceiver -> {
val calleeExpression = resolvedCall!!.getCall().getCalleeExpression()
bindingContext[BindingContext.EXPRESSION_DATA_FLOW_INFO, calleeExpression]?.let { dataFlowInfo ->
val possibleTypes = dataFlowInfo.getPossibleTypes(DataFlowValueFactory.createDataFlowValue(receiverToExtract))
val possibleTypes = dataFlowInfo.getPossibleTypes(DataFlowValueFactory.createDataFlowValue(receiverToExtract), true)
CommonSupertypes.commonSupertype(possibleTypes)
} ?: receiverToExtract.getType()
}