From acb9b6df3b347582c1d5d6dfde307c3a3daa38eb Mon Sep 17 00:00:00 2001 From: Andrey Cherkasov Date: Tue, 30 Jul 2024 21:17:34 +0400 Subject: [PATCH] [kotlin] Small adjustment IJ-CR-141232 ^KTIJ-29523 GitOrigin-RevId: aac763e23d759711f51962151bcf7f0cc8591018 --- .../org/jetbrains/kotlin/idea/quickfix/RemoveFunctionBodyFix.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/RemoveFunctionBodyFix.kt b/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/RemoveFunctionBodyFix.kt index 18cd6841b787..a750740bcdc0 100644 --- a/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/RemoveFunctionBodyFix.kt +++ b/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/RemoveFunctionBodyFix.kt @@ -20,7 +20,7 @@ class RemoveFunctionBodyFix( elementContext: Unit, updater: ModPsiUpdater, ) { - val bodyExpression = element.bodyExpression!! + val bodyExpression = element.bodyExpression ?: return val equalsToken = element.equalsToken if (equalsToken != null) { val commentSaver = CommentSaver(PsiChildRange(equalsToken.nextSibling, bodyExpression.prevSibling), true)