diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt index 3267f22330f..53b3fb50230 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt @@ -165,7 +165,7 @@ abstract class FirDataFlowAnalyzer( } localFunctionNode?.mergeIncomingFlow() functionEnterNode.mergeIncomingFlow { _, flow -> - if (function is FirAnonymousFunction && function.invocationKind?.canBeRevisited() == true) { + if (function is FirAnonymousFunction && function.invocationKind?.canBeRevisited() != false) { enterRepeatableStatement(flow, function) } } @@ -176,7 +176,7 @@ abstract class FirDataFlowAnalyzer( if (function is FirDefaultPropertyAccessor) return null context.variableAssignmentAnalyzer.exitFunction() - if (function is FirAnonymousFunction && function.invocationKind?.canBeRevisited() == true) { + if (function is FirAnonymousFunction && function.invocationKind?.canBeRevisited() != false) { exitRepeatableStatement(function) } diff --git a/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlace.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlace.fir.kt index 019fc73d12b..21dc9e562d4 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlace.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlace.fir.kt @@ -27,7 +27,7 @@ fun test1() { var x: Any? = materialize() require(x is String) runWithoutContract { - x.length + x.length x = 10 } } @@ -81,9 +81,9 @@ fun test7() { var x: Any? = materialize() require(x is String) runWithoutContract { - x.length + x.length runWithoutContract { - x.length + x.length } x = 10 } @@ -498,7 +498,7 @@ fun test51() { var x: Any = materialize() while (x is String) { runWithoutContract { - x.length + x.length x = 10 } } @@ -569,7 +569,7 @@ fun test58() { for (i in 1..3) { require(x is String) runWithoutContract { - x.length + x.length x = 10 } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlaceAndBounds.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlaceAndBounds.fir.kt index 1e6483652aa..c5d1ba7b3ec 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlaceAndBounds.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/lambdasWithContracts/lambdaWithCallInPlaceAndBounds.fir.kt @@ -370,7 +370,7 @@ fun test33() { var y = x runWithoutContract { while (x is String) { - y.length + y.length x.length } x = 10 diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt index 4475e956293..f4041257f4c 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.fir.kt @@ -30,7 +30,7 @@ fun baz(s: String?) { x.hashCode() } run { - x.hashCode() + x.hashCode() x = null } } @@ -40,7 +40,7 @@ fun gaz(s: String?) { var x = s if (x != null) { run { - x.hashCode() + x.hashCode() x = null } run {