Cleanup code: KotlinRedundantOverrideInspection
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user