Minor: Fix formatting

Original commit: d86b54a2f1ba3bd2efb4cb3c5dcca09fc55468e5

GitOrigin-RevId: 0445b85c1b556e363499dffa82498958cae68907
This commit is contained in:
Yan Zhulanow
2020-06-03 18:55:54 +03:00
committed by intellij-monorepo-bot
parent 2159fefeaa
commit 2c94f3eaeb
@@ -54,9 +54,10 @@ class UselessCallOnCollectionInspection : AbstractUselessCallInspection() {
if (TypeUtils.isNullableType(receiverTypeArgument)) return
if (calleeExpression.text != "filterNotNull") {
// Also check last argument functional type to have not-null result
if (!resolvedCall.hasLastFunctionalParameterWithResult(context) {
!TypeUtils.isNullableType(it) && it.constructor !is TypeVariableTypeConstructor
}) return
val lastParameterMatches = resolvedCall.hasLastFunctionalParameterWithResult(context) {
!TypeUtils.isNullableType(it) && it.constructor !is TypeVariableTypeConstructor
}
if (!lastParameterMatches) return
}
}