[K/N] Fix ObjCAction, ObjCOutlet not switching state. ^KT-58441

This commit is contained in:
Alexander Shabalin
2023-05-03 17:26:09 +02:00
committed by Space Team
parent 860d0e32f7
commit 917f64c893
@@ -342,7 +342,9 @@ private class InteropLoweringPart1(val generationState: NativeGenerationState) :
val newFunction =
IrFunctionImpl(
function.startOffset, function.endOffset,
IrDeclarationOrigin.DEFINED,
// The generated function is called by ObjC and contains Kotlin code, so
// it must switch thread state and potentially initialize runtime on this thread.
CBridgeOrigin.C_TO_KOTLIN_BRIDGE,
IrSimpleFunctionSymbolImpl(),
("imp:$selector").synthesizedName,
DescriptorVisibilities.PRIVATE,