diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/LiftReturnOrAssignmentInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/LiftReturnOrAssignmentInspection.kt index 5a69c7024ec..0366355b1d7 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/LiftReturnOrAssignmentInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/LiftReturnOrAssignmentInspection.kt @@ -37,9 +37,10 @@ class LiftReturnOrAssignmentInspection : AbstractKotlinInspection() { val foldableReturns = BranchedFoldingUtils.getFoldableReturns(expression) if (foldableReturns?.isNotEmpty() == true) { val hasOtherReturns = expression.anyDescendantOfType { it !in foldableReturns } - holder.registerProblem( + holder.registerProblemWithoutOfflineInformation( keyword, "Return can be lifted out of '${keyword.text}'", + isOnTheFly, if (!hasOtherReturns && foldableReturns.size > 1) ProblemHighlightType.GENERIC_ERROR_OR_WARNING else ProblemHighlightType.INFORMATION, LiftReturnOutFix(keyword.text)