From 977d8e1cd7124abc87e7eccc1a2a15a787c6a29c Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 11 May 2017 18:15:10 +0300 Subject: [PATCH] If to safe access: fix message when no dot calls are available Now "Replace 'if' with safe cast" is suggested --- .../intentions/IfThenToSafeAccessIntention.kt | 3 +++ .../branched/ifThenToSafeAccess/inspectionData/expected.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt index 130268fca63..556481bb22b 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt @@ -40,6 +40,9 @@ class IfThenToSafeAccessIntention : SelfTargetingOffsetIndependentIntentionlight_idea_test_case If-Then foldable to '?.' - Replace 'if' expression with safe access expression + Replace 'if' expression with safe cast expression