From f7147dc6f3b7643b502a17d3a295c0c2fb498c36 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Fri, 9 Apr 2021 18:33:18 +0300 Subject: [PATCH] CoroutineTransformerMethodVisitor: fix potential type mismatch The fixed code compiles properly only due to null smart cast. Without it, e.g. in FIR, we'd have type mismatch error for this return. --- .../codegen/coroutines/CoroutineTransformerMethodVisitor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt index 4110c690ea8..9dec302abf4 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt @@ -999,7 +999,7 @@ class CoroutineTransformerMethodVisitor( else -> next = next.next } } - return next + return null } // It's necessary to preserve some sensible invariants like there should be no jump in the middle of try-catch-block