diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/EntryPoint.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/EntryPoint.kt index ce27da06222..b023273ad36 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/EntryPoint.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/EntryPoint.kt @@ -51,6 +51,11 @@ internal fun findMainEntryPoint(context: Context): FunctionDescriptor? { null } + if (main != null && main.isSuspend) { + context.reportCompilationError("Entry point can not be a suspend function.") + return null + } + return main }