If-then to safe access/elvis: fix mistake in shouldBeTransformed
This should fix two inspection tests (implicit receiver case) Before this commit, check of 'this' on null was accidentally not highlighted by if-then to safe access or elvis. Now it is.
This commit is contained in:
+1
-1
@@ -313,7 +313,7 @@ internal fun KtIfExpression.shouldBeTransformed(): Boolean {
|
||||
return when (condition) {
|
||||
is KtBinaryExpression -> {
|
||||
val baseClause = (if (condition.operationToken == KtTokens.EQEQ) `else` else then)?.unwrapBlockOrParenthesis()
|
||||
!baseClause.isClauseTransformableToLetOnly(checkedExpression())
|
||||
!baseClause.isClauseTransformableToLetOnly(condition.checkedExpression())
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user