Cleanup code: KotlinRedundantOverrideInspection

This commit is contained in:
Mikhail Glukhikh
2018-09-04 14:40:29 +03:00
parent 6cee310c54
commit 607392a2ab
@@ -33,7 +33,7 @@ class KotlinRedundantOverrideInspection : AbstractKotlinInspection(), CleanupLoc
val body = bodyExpression.statements.singleOrNull() val body = bodyExpression.statements.singleOrNull()
when (body) { when (body) {
is KtReturnExpression -> body.returnedExpression is KtReturnExpression -> body.returnedExpression
is KtDotQualifiedExpression -> body.takeIf { is KtDotQualifiedExpression -> body.takeIf { _ ->
function.typeReference.let { it == null || it.text == "Unit" } function.typeReference.let { it == null || it.text == "Unit" }
} }
else -> null else -> null