[FIR] Fix integer approximation on safe calls

This commit is contained in:
Simon Ogorodnik
2020-07-30 15:30:13 +03:00
parent 2a4e1a0b99
commit 34f5cfbf96
@@ -149,6 +149,13 @@ class FirCallCompletionResultsWriterTransformer(
return result.compose()
}
override fun transformCheckedSafeCallSubject(
checkedSafeCallSubject: FirCheckedSafeCallSubject,
data: ExpectedArgumentType?
): CompositeTransformResult<FirStatement> {
return checkedSafeCallSubject.transform(integerApproximator, data?.getExpectedType(checkedSafeCallSubject))
}
override fun transformFunctionCall(functionCall: FirFunctionCall, data: ExpectedArgumentType?): CompositeTransformResult<FirStatement> {
val calleeReference = functionCall.calleeReference as? FirNamedReferenceWithCandidate
?: return functionCall.compose()