diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt index 3c386215bca..99354dfcb2b 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLoweringPhases.kt @@ -309,7 +309,7 @@ internal val coroutinesPhase = makeKonanFileLoweringPhase( ::NativeSuspendFunctionsLowering, name = "Coroutines", description = "Coroutines lowering", - prerequisite = setOf(localFunctionsPhase, finallyBlocksPhase) + prerequisite = setOf(localFunctionsPhase, finallyBlocksPhase, kotlinNothingValueExceptionPhase) ) internal val typeOperatorPhase = makeKonanFileLoweringPhase( diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt index 132ffda2508..652d56bf08f 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt @@ -351,11 +351,11 @@ internal val allLoweringsPhase = namedIrModulePhase( interopPhase then varargPhase then compileTimeEvaluatePhase then + kotlinNothingValueExceptionPhase then coroutinesPhase then typeOperatorPhase then bridgesPhase then autoboxPhase then - kotlinNothingValueExceptionPhase then returnsInsertionPhase ), actions = setOf(defaultDumper, ::moduleValidationCallback)