From cb19b8bf46d07abf62afad758571d9242df53291 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 13:44:28 +0100 Subject: [PATCH 01/18] Conditionally enable Swift export --- .github/workflows/run-integration-tests.yaml | 6 +++++- sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj | 7 ++++--- sample/shared/build.gradle.kts | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-integration-tests.yaml b/.github/workflows/run-integration-tests.yaml index ac9503f1..0d6037ef 100644 --- a/.github/workflows/run-integration-tests.yaml +++ b/.github/workflows/run-integration-tests.yaml @@ -14,6 +14,7 @@ jobs: matrix: platform: [ iOS, macOS, tvOS, watchOS ] embeddable-compiler: [ true, false ] + swift-export: [ true, false ] include: - java: '17' - xcode: '15.2' @@ -29,7 +30,7 @@ jobs: - platform: watchOS scheme: watchOS Tests destination: platform=watchOS Simulator,name=Apple Watch Series 10 (46mm) - name: ${{ format('{0} (embeddable {1})', matrix.platform, matrix.embeddable-compiler) }} + name: ${{ format('{0} (embeddable {1}, swiftExport {2})', matrix.platform, matrix.embeddable-compiler, matrix.swift-export) }} runs-on: macos-14 defaults: run: @@ -55,10 +56,13 @@ jobs: - name: Set kotlin.native.useEmbeddableCompilerJar run: echo "kotlin.native.useEmbeddableCompilerJar=${{ matrix.embeddable-compiler }}" >> gradle.properties - name: Run tests + env: + NATIVE_COROUTINES_SWIFT_EXPORT: ${{ matrix.swift-export }} run: >- set -o pipefail && xcodebuild test -project KMPNativeCoroutinesSample.xcodeproj -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" + 'SWIFT_ACTIVE_COMPILATION_CONDITIONS=$(inherited) ${{ matrix.swift-export && 'NATIVE_COROUTINES_SWIFT_EXPORT' || '' }}' | xcbeautify --renderer github-actions diff --git a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj index 4586ed73..0b132de9 100644 --- a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj +++ b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj @@ -791,7 +791,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D717624267009E800846F75 /* Build configuration list for PBXNativeTarget "iOS App" */; buildPhases = ( - 1D5CF258275E8992002389EE /* ShellScript */, + 1D5CF258275E8992002389EE /* Build shared Kotlin module */, 1D71760F267009E700846F75 /* Sources */, 1D717610267009E700846F75 /* Frameworks */, 1D717611267009E700846F75 /* Resources */, @@ -1034,7 +1034,7 @@ shellPath = /bin/sh; shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; - 1D5CF258275E8992002389EE /* ShellScript */ = { + 1D5CF258275E8992002389EE /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1044,13 +1044,14 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; 1DB9CD1D275E935100E13AFD /* ShellScript */ = { isa = PBXShellScriptBuildPhase; diff --git a/sample/shared/build.gradle.kts b/sample/shared/build.gradle.kts index 95aaa0e3..1a674556 100644 --- a/sample/shared/build.gradle.kts +++ b/sample/shared/build.gradle.kts @@ -47,4 +47,8 @@ kotlin { } } } + swiftExport { + moduleName = "NativeCoroutinesSampleShared" + flattenPackage = "com.rickclephas.kmp.nativecoroutines.sample" + } } From 2c5488378856fc3d2b3fa43bd3ed1eab5ecc8094 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 15:15:32 +0100 Subject: [PATCH 02/18] Add SWIFT_EXPORT config option --- ...p-nativecoroutines-compiler-embeddable.api | 11 ++++++++++ .../api/kmp-nativecoroutines-compiler.api | 11 ++++++++++ ...KmpNativeCoroutinesCommandLineProcessor.kt | 2 +- .../compiler/config/SwiftExport.kt | 22 +++++++++++++++++++ .../kmp-nativecoroutines-gradle-plugin.api | 3 +++ .../gradle/KmpNativeCoroutinesExtension.kt | 8 +++++++ .../gradle/KmpNativeCoroutinesPlugin.kt | 2 ++ .../api/kmp-nativecoroutines-idea-plugin.api | 2 ++ ...iveCoroutinesGradleProjectImportHandler.kt | 2 ++ .../idea/gradle/KmpNativeCoroutinesModel.kt | 4 ++++ .../KmpNativeCoroutinesModelBuilderService.kt | 4 ++++ sample/shared/build.gradle.kts | 4 ++++ 12 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport.kt diff --git a/kmp-nativecoroutines-compiler-embeddable/api/kmp-nativecoroutines-compiler-embeddable.api b/kmp-nativecoroutines-compiler-embeddable/api/kmp-nativecoroutines-compiler-embeddable.api index b7d4c307..96f69365 100644 --- a/kmp-nativecoroutines-compiler-embeddable/api/kmp-nativecoroutines-compiler-embeddable.api +++ b/kmp-nativecoroutines-compiler-embeddable/api/kmp-nativecoroutines-compiler-embeddable.api @@ -102,6 +102,17 @@ public final class com/rickclephas/kmp/nativecoroutines/compiler/config/Suffixes public static final fun getSUFFIX ()Lcom/rickclephas/kmp/nativecoroutines/compiler/config/ConfigOptionWithDefault; } +public final class com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport : java/lang/Enum { + public static final field NO_FUNC_RETURN_TYPES Lcom/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport; + public static fun values ()[Lcom/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport; +} + +public final class com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExportKt { + public static final fun getSWIFT_EXPORT ()Lcom/rickclephas/kmp/nativecoroutines/compiler/config/ConfigOptionWithDefault; +} + public final class com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors : org/jetbrains/kotlin/diagnostics/KtDiagnosticsContainer { public static final field INSTANCE Lcom/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors; public final fun getCONFLICT_COROUTINES ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; diff --git a/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api b/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api index b7d4c307..96f69365 100644 --- a/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api +++ b/kmp-nativecoroutines-compiler/api/kmp-nativecoroutines-compiler.api @@ -102,6 +102,17 @@ public final class com/rickclephas/kmp/nativecoroutines/compiler/config/Suffixes public static final fun getSUFFIX ()Lcom/rickclephas/kmp/nativecoroutines/compiler/config/ConfigOptionWithDefault; } +public final class com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport : java/lang/Enum { + public static final field NO_FUNC_RETURN_TYPES Lcom/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport; + public static fun values ()[Lcom/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport; +} + +public final class com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExportKt { + public static final fun getSWIFT_EXPORT ()Lcom/rickclephas/kmp/nativecoroutines/compiler/config/ConfigOptionWithDefault; +} + public final class com/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors : org/jetbrains/kotlin/diagnostics/KtDiagnosticsContainer { public static final field INSTANCE Lcom/rickclephas/kmp/nativecoroutines/compiler/fir/diagnostics/FirKmpNativeCoroutinesErrors; public final fun getCONFLICT_COROUTINES ()Lorg/jetbrains/kotlin/diagnostics/KtDiagnosticFactory0; diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCommandLineProcessor.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCommandLineProcessor.kt index 31c50a96..3bc438df 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCommandLineProcessor.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCommandLineProcessor.kt @@ -9,7 +9,7 @@ public class KmpNativeCoroutinesCommandLineProcessor: CommandLineProcessor { override val pluginId: String = "com.rickclephas.kmp.nativecoroutines" override val pluginOptions: Collection = listOf( - EXPOSED_SEVERITY, GENERATED_SOURCE_DIR, + EXPOSED_SEVERITY, GENERATED_SOURCE_DIR, SWIFT_EXPORT, SUFFIX, FLOW_VALUE_SUFFIX, FLOW_REPLAY_CACHE_SUFFIX, STATE_SUFFIX, STATE_FLOW_SUFFIX ) diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport.kt new file mode 100644 index 00000000..2c997aa5 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/config/SwiftExport.kt @@ -0,0 +1,22 @@ +package com.rickclephas.kmp.nativecoroutines.compiler.config + +import org.jetbrains.kotlin.utils.filterToSetOrEmpty + +public enum class SwiftExport { + NO_FUNC_RETURN_TYPES, +} + +public val SWIFT_EXPORT: ConfigOptionWithDefault> = + object : ConfigOptionWithDefault>("swiftExport") { + override val required: Boolean = false + override val description: String = "Specifies the Swift export compatibility version" + override val valueDescription: String = "0" + override val defaultValue: Set = emptySet() + override fun parse(value: String): Set { + val flags = value.toLong() + return SwiftExport.entries.filterToSetOrEmpty { + val flag = 1L shl it.ordinal + (flags and flag) == flag + } + } + } diff --git a/kmp-nativecoroutines-gradle-plugin/api/kmp-nativecoroutines-gradle-plugin.api b/kmp-nativecoroutines-gradle-plugin/api/kmp-nativecoroutines-gradle-plugin.api index 0e2a1de7..807f32b7 100644 --- a/kmp-nativecoroutines-gradle-plugin/api/kmp-nativecoroutines-gradle-plugin.api +++ b/kmp-nativecoroutines-gradle-plugin/api/kmp-nativecoroutines-gradle-plugin.api @@ -17,6 +17,8 @@ public class com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExte public final fun getStateFlowSuffix ()Ljava/lang/String; public final fun getStateSuffix ()Ljava/lang/String; public final fun getSuffix ()Ljava/lang/String; + public final fun getSwiftExport ()Z + public final fun getSwiftExportVersion ()J public final fun setExposedSeverity (Lcom/rickclephas/kmp/nativecoroutines/gradle/ExposedSeverity;)V public final fun setFileSuffix (Ljava/lang/String;)V public final fun setFlowReplayCacheSuffix (Ljava/lang/String;)V @@ -24,6 +26,7 @@ public class com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExte public final fun setStateFlowSuffix (Ljava/lang/String;)V public final fun setStateSuffix (Ljava/lang/String;)V public final fun setSuffix (Ljava/lang/String;)V + public final fun setSwiftExport (Z)V } public final class com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesPlugin : org/jetbrains/kotlin/gradle/plugin/KotlinCompilerPluginSupportPlugin { diff --git a/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt b/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt index e4b8e124..aaa77af5 100644 --- a/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt +++ b/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt @@ -37,6 +37,14 @@ public open class KmpNativeCoroutinesExtension { * A list of generated source directories. */ public val generatedSourceDirs: MutableList = mutableListOf("build/generated") + /** + * Indicates if the plugin should run in Swift export compatibility mode. + */ + public var swiftExport: Boolean = false + /** + * The compatibility version of Swift export used by the plugin. + */ + public val swiftExportVersion: Long = 0x1 } public enum class ExposedSeverity { diff --git a/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesPlugin.kt b/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesPlugin.kt index 611cdd0c..e4cbc901 100644 --- a/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesPlugin.kt +++ b/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesPlugin.kt @@ -45,6 +45,8 @@ public class KmpNativeCoroutinesPlugin: KotlinCompilerPluginSupportPlugin { extension.flowReplayCacheSuffix?.let { add(SubpluginOption("flowReplayCacheSuffix", it)) } add(SubpluginOption("stateSuffix", extension.stateSuffix)) extension.stateFlowSuffix?.let { add(SubpluginOption("stateFlowSuffix", it)) } + val swiftExport = extension.swiftExportVersion.takeIf { extension.swiftExport } ?: 0 + add(SubpluginOption("swiftExport", swiftExport.toString())) } } } diff --git a/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api b/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api index 6820b7d5..3f413556 100644 --- a/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api +++ b/kmp-nativecoroutines-idea-plugin/api/kmp-nativecoroutines-idea-plugin.api @@ -25,6 +25,8 @@ public abstract interface class com/rickclephas/kmp/nativecoroutines/idea/gradle public abstract fun getStateFlowSuffix ()Ljava/lang/String; public abstract fun getStateSuffix ()Ljava/lang/String; public abstract fun getSuffix ()Ljava/lang/String; + public abstract fun getSwiftExport ()Z + public abstract fun getSwiftExportVersion ()J } public final class com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModelBuilderService : org/jetbrains/plugins/gradle/tooling/AbstractModelBuilderService { diff --git a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesGradleProjectImportHandler.kt b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesGradleProjectImportHandler.kt index 0e4716d4..2dcfde74 100644 --- a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesGradleProjectImportHandler.kt +++ b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesGradleProjectImportHandler.kt @@ -34,5 +34,7 @@ public class KmpNativeCoroutinesGradleProjectImportHandler: AbstractCompilerPlug model.stateFlowSuffix?.let { add(STATE_FLOW_SUFFIX, it) } add(EXPOSED_SEVERITY, model.exposedSeverity) addAll(GENERATED_SOURCE_DIR, model.generatedSourceDirs) + val swiftExport = model.swiftExportVersion.takeIf { model.swiftExport } ?: 0 + add(SWIFT_EXPORT, swiftExport.toString()) } } diff --git a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModel.kt b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModel.kt index 847eda0f..2845384e 100644 --- a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModel.kt +++ b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModel.kt @@ -11,6 +11,8 @@ public interface KmpNativeCoroutinesModel: Serializable { public val stateFlowSuffix: String? public val exposedSeverity: String public val generatedSourceDirs: List + public val swiftExport: Boolean + public val swiftExportVersion: Long } internal class KmpNativeCoroutinesModelImpl( @@ -21,6 +23,8 @@ internal class KmpNativeCoroutinesModelImpl( override val stateFlowSuffix: String?, override val exposedSeverity: String, override val generatedSourceDirs: List, + override val swiftExport: Boolean, + override val swiftExportVersion: Long, ): KmpNativeCoroutinesModel internal val KmpNativeCoroutinesModelKey = Key(KmpNativeCoroutinesModel::class.java.name, 1) diff --git a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModelBuilderService.kt b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModelBuilderService.kt index 77d8160f..ba0c8516 100644 --- a/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModelBuilderService.kt +++ b/kmp-nativecoroutines-idea-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/idea/gradle/KmpNativeCoroutinesModelBuilderService.kt @@ -22,6 +22,8 @@ public class KmpNativeCoroutinesModelBuilderService: AbstractModelBuilderService val exposedSeverity = extension.get>("exposedSeverity")?.name ?: "WARNING" val generatedSourceDirs = extension.get>("generatedSourceDirs").orEmpty() .map { project.file(it).absolutePath }.distinct() + val swiftExport = extension.get("swiftExport") ?: false + val swiftExportVersion = extension.get("swiftExportVersion") ?: 0 return KmpNativeCoroutinesModelImpl( suffix = suffix, @@ -31,6 +33,8 @@ public class KmpNativeCoroutinesModelBuilderService: AbstractModelBuilderService stateFlowSuffix = stateFlowSuffix, exposedSeverity = exposedSeverity, generatedSourceDirs = generatedSourceDirs, + swiftExport = swiftExport, + swiftExportVersion = swiftExportVersion, ) } diff --git a/sample/shared/build.gradle.kts b/sample/shared/build.gradle.kts index 1a674556..77e95cba 100644 --- a/sample/shared/build.gradle.kts +++ b/sample/shared/build.gradle.kts @@ -52,3 +52,7 @@ kotlin { flattenPackage = "com.rickclephas.kmp.nativecoroutines.sample" } } + +nativeCoroutines { + swiftExport = System.getenv("NATIVE_COROUTINES_SWIFT_EXPORT")?.toBooleanStrictOrNull() == true +} From 4e0d9f2fe6afe34acbfa4c831d0be846e8c6cae6 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 16:25:03 +0100 Subject: [PATCH 03/18] Disable NativeSuspend and NativeFlow for Swift export --- ...NativeCoroutinesCompilerPluginRegistrar.kt | 2 +- .../compiler/fir/codegen/NativeFunction.kt | 8 +++++++- .../compiler/fir/codegen/NativeProperty.kt | 4 +++- .../fir/codegen/SharedFlowReplayCache.kt | 6 ++++-- .../compiler/fir/codegen/StateFlowValue.kt | 4 +++- ...oroutinesDeclarationGenerationExtension.kt | 13 ++++++------ .../fir/utils/NativeConeKotlinType.kt | 20 +++++++++++-------- .../compiler/ir/codegen/NativeFunction.kt | 16 +++++++++------ .../compiler/ir/codegen/NativeProperty.kt | 10 +++++++--- ...mpNativeCoroutinesIrGenerationExtension.kt | 7 +++++-- .../KmpNativeCoroutinesIrTransformer.kt | 10 ++++++++-- 11 files changed, 67 insertions(+), 33 deletions(-) diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCompilerPluginRegistrar.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCompilerPluginRegistrar.kt index a53ac5fd..2cce4051 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCompilerPluginRegistrar.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/KmpNativeCoroutinesCompilerPluginRegistrar.kt @@ -20,6 +20,6 @@ public class KmpNativeCoroutinesCompilerPluginRegistrar: CompilerPluginRegistrar StorageComponentContainerContributor.registerExtension( KmpNativeCoroutinesStorageComponentContainerContributor(configuration) ) - IrGenerationExtension.registerExtension(KmpNativeCoroutinesIrGenerationExtension()) + IrGenerationExtension.registerExtension(KmpNativeCoroutinesIrGenerationExtension(configuration)) } } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt index 5956e774..0f3be28b 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.fir.codegen +import com.rickclephas.kmp.nativecoroutines.compiler.config.SwiftExport import com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.* import com.rickclephas.kmp.nativecoroutines.compiler.utils.ClassIds import com.rickclephas.kmp.nativecoroutines.compiler.utils.NativeCoroutinesAnnotation @@ -21,7 +22,8 @@ import org.jetbrains.kotlin.name.CallableId internal fun FirExtension.buildNativeFunction( callableId: CallableId, originalSymbol: FirNamedFunctionSymbol, - annotation: NativeCoroutinesAnnotation + annotation: NativeCoroutinesAnnotation, + swiftExport: Set, ): FirNamedFunctionSymbol? { val firCallableSignature = originalSymbol.getCallableSignature(session) ?: return null val callableSignature = firCallableSignature.signature @@ -40,6 +42,9 @@ internal fun FirExtension.buildNativeFunction( status = originalSymbol.getGeneratedDeclarationStatus(session) ?.copy(isInline = originalSymbol.isInline) ?: return null + if (SwiftExport.NO_FUNC_RETURN_TYPES in swiftExport) { + status = status.copy(isSuspend = callableSignature.isSuspend) + } dispatchReceiverType = originalSymbol.dispatchReceiverType @@ -68,6 +73,7 @@ internal fun FirExtension.buildNativeFunction( returnTypeRef = firCallableSignature.getNativeType( callableSignature.returnType, + swiftExport, callableSignature.isSuspend ).let(typeParameters.substitutor::substituteOrSelf).toFirResolvedTypeRef() diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeProperty.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeProperty.kt index 62f440ba..aa1b0a7d 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeProperty.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeProperty.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.fir.codegen +import com.rickclephas.kmp.nativecoroutines.compiler.config.SwiftExport import com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.* import com.rickclephas.kmp.nativecoroutines.compiler.utils.ClassIds import com.rickclephas.kmp.nativecoroutines.compiler.utils.NativeCoroutinesAnnotation @@ -24,6 +25,7 @@ internal fun FirExtension.buildNativeProperty( annotation: NativeCoroutinesAnnotation, objCName: String? = null, objCNameSuffix: String? = null, + swiftExport: Set, ): FirPropertySymbol? { val firCallableSignature = originalSymbol.getCallableSignature(session) ?: return null val callableSignature = firCallableSignature.signature @@ -61,7 +63,7 @@ internal fun FirExtension.buildNativeProperty( typeParameters.substitutor ) - returnTypeRef = firCallableSignature.getNativeType(callableSignature.returnType) + returnTypeRef = firCallableSignature.getNativeType(callableSignature.returnType, swiftExport) .let(typeParameters.substitutor::substituteOrSelf) .toFirResolvedTypeRef() diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/SharedFlowReplayCache.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/SharedFlowReplayCache.kt index d95c9221..de6083ec 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/SharedFlowReplayCache.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/SharedFlowReplayCache.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.fir.codegen +import com.rickclephas.kmp.nativecoroutines.compiler.config.SwiftExport import com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.* import com.rickclephas.kmp.nativecoroutines.compiler.utils.CallableSignature import com.rickclephas.kmp.nativecoroutines.compiler.utils.ClassIds @@ -25,7 +26,8 @@ internal fun FirExtension.buildSharedFlowReplayCacheProperty( callableId: CallableId, originalSymbol: FirPropertySymbol, annotation: NativeCoroutinesAnnotation, - objCNameSuffix: String? + objCNameSuffix: String?, + swiftExport: Set, ): FirPropertySymbol? { val firCallableSignature = originalSymbol.getCallableSignature(session) ?: return null val callableSignature = firCallableSignature.signature @@ -65,7 +67,7 @@ internal fun FirExtension.buildSharedFlowReplayCacheProperty( ) returnTypeRef = StandardClassIds.List.constructClassLikeType( - arrayOf(firCallableSignature.getNativeType(callableSignature.returnType.valueType)), + arrayOf(firCallableSignature.getNativeType(callableSignature.returnType.valueType, swiftExport)), callableSignature.returnType.isNullable ).let(typeParameters.substitutor::substituteOrSelf).toFirResolvedTypeRef() diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/StateFlowValue.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/StateFlowValue.kt index 50a55ac8..7fe72031 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/StateFlowValue.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/StateFlowValue.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.fir.codegen +import com.rickclephas.kmp.nativecoroutines.compiler.config.SwiftExport import com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.* import com.rickclephas.kmp.nativecoroutines.compiler.utils.CallableSignature import com.rickclephas.kmp.nativecoroutines.compiler.utils.ClassIds @@ -27,6 +28,7 @@ internal fun FirExtension.buildStateFlowValueProperty( annotation: NativeCoroutinesAnnotation, objCName: String? = null, objCNameSuffix: String? = null, + swiftExport: Set, ): FirPropertySymbol? { val firCallableSignature = originalSymbol.getCallableSignature(session) ?: return null val callableSignature = firCallableSignature.signature @@ -65,7 +67,7 @@ internal fun FirExtension.buildStateFlowValueProperty( typeParameters.substitutor ) - returnTypeRef = firCallableSignature.getNativeType(callableSignature.returnType.valueType) + returnTypeRef = firCallableSignature.getNativeType(callableSignature.returnType.valueType, swiftExport) .applyIf(callableSignature.returnType.isNullable) { withNullability(true, session.typeContext) } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/extensions/KmpNativeCoroutinesDeclarationGenerationExtension.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/extensions/KmpNativeCoroutinesDeclarationGenerationExtension.kt index d5610c59..9fbb18fb 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/extensions/KmpNativeCoroutinesDeclarationGenerationExtension.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/extensions/KmpNativeCoroutinesDeclarationGenerationExtension.kt @@ -77,6 +77,7 @@ internal class KmpNativeCoroutinesDeclarationGenerationExtension( private val flowReplayCacheSuffix = configuration[FLOW_REPLAY_CACHE_SUFFIX] private val stateSuffix = configuration[STATE_SUFFIX] private val stateFlowSuffix = configuration[STATE_FLOW_SUFFIX] + private val swiftExport = configuration[SWIFT_EXPORT] private fun getCallableNamesForSymbol(symbol: FirCallableSymbol<*>): Set { val annotation = getAnnotationForSymbol(symbol) ?: return emptySet() @@ -115,7 +116,7 @@ internal class KmpNativeCoroutinesDeclarationGenerationExtension( callableId, suffix, setOf(NativeCoroutines, NativeCoroutinesRefined) ) { symbol, annotation -> - buildNativeFunction(callableId, symbol, annotation) + buildNativeFunction(callableId, symbol, annotation, swiftExport) } } @@ -147,35 +148,35 @@ internal class KmpNativeCoroutinesDeclarationGenerationExtension( callableId, suffix, setOf(NativeCoroutines, NativeCoroutinesRefined) ) { symbol, annotation -> - buildNativeProperty(callableId, symbol, annotation, objCName = symbol.name.identifier) + buildNativeProperty(callableId, symbol, annotation, objCName = symbol.name.identifier, swiftExport = swiftExport) } generateProperties( context?.owner, callableId, flowValueSuffix, setOf(NativeCoroutines, NativeCoroutinesRefined) ) { symbol, annotation -> - buildStateFlowValueProperty(callableId, symbol, annotation, objCNameSuffix = flowValueSuffix) + buildStateFlowValueProperty(callableId, symbol, annotation, objCNameSuffix = flowValueSuffix, swiftExport = swiftExport) } generateProperties( context?.owner, callableId, flowReplayCacheSuffix, setOf(NativeCoroutines, NativeCoroutinesRefined) ) { symbol, annotation -> - buildSharedFlowReplayCacheProperty(callableId, symbol, annotation, flowReplayCacheSuffix) + buildSharedFlowReplayCacheProperty(callableId, symbol, annotation, flowReplayCacheSuffix, swiftExport) } generateProperties( context?.owner, callableId, stateSuffix, setOf(NativeCoroutinesState, NativeCoroutinesRefinedState) ) { symbol, annotation -> - buildStateFlowValueProperty(callableId, symbol, annotation, objCName = symbol.name.identifier) + buildStateFlowValueProperty(callableId, symbol, annotation, objCName = symbol.name.identifier, swiftExport = swiftExport) } generateProperties( context?.owner, callableId, stateFlowSuffix, setOf(NativeCoroutinesState, NativeCoroutinesRefinedState) ) { symbol, annotation -> - buildNativeProperty(callableId, symbol, annotation, objCNameSuffix = stateFlowSuffix) + buildNativeProperty(callableId, symbol, annotation, objCNameSuffix = stateFlowSuffix, swiftExport = swiftExport) } } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/utils/NativeConeKotlinType.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/utils/NativeConeKotlinType.kt index 9ae41ea1..d8ccea27 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/utils/NativeConeKotlinType.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/utils/NativeConeKotlinType.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.fir.utils +import com.rickclephas.kmp.nativecoroutines.compiler.config.SwiftExport import com.rickclephas.kmp.nativecoroutines.compiler.utils.CallableSignature import com.rickclephas.kmp.nativecoroutines.compiler.utils.ClassIds import org.jetbrains.kotlin.fir.types.ConeKotlinType @@ -8,16 +9,19 @@ import org.jetbrains.kotlin.fir.types.constructClassLikeType internal fun FirCallableSignature.getNativeType( type: CallableSignature.Type, - isSuspend: Boolean = false + swiftExport: Set, + isSuspend: Boolean = false, ): ConeKotlinType { var nativeType = getRawType(type) - if (type is CallableSignature.Type.Flow) { - val typeArgs = arrayOf(getRawType(type.valueType)) - nativeType = ClassIds.nativeFlow.constructClassLikeType(typeArgs, type.isNullable) - } - if (isSuspend) { - val typeArgs = arrayOf(nativeType) - nativeType = ClassIds.nativeSuspend.constructClassLikeType(typeArgs) + if (SwiftExport.NO_FUNC_RETURN_TYPES !in swiftExport) { + if (type is CallableSignature.Type.Flow) { + val typeArgs = arrayOf(getRawType(type.valueType)) + nativeType = ClassIds.nativeFlow.constructClassLikeType(typeArgs, type.isNullable) + } + if (isSuspend) { + val typeArgs = arrayOf(nativeType) + nativeType = ClassIds.nativeSuspend.constructClassLikeType(typeArgs) + } } return nativeType } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeFunction.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeFunction.kt index f2dc8340..aa854352 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeFunction.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeFunction.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.ir.codegen +import com.rickclephas.kmp.nativecoroutines.compiler.config.SwiftExport import com.rickclephas.kmp.nativecoroutines.compiler.ir.utils.IrBlockBodyExpression.Companion.irGet import com.rickclephas.kmp.nativecoroutines.compiler.utils.CallableSignature import org.jetbrains.kotlin.backend.common.lower.DeclarationIrBuilder @@ -12,18 +13,21 @@ import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI internal fun GeneratorContext.buildNativeFunctionBody( function: IrSimpleFunction, originalFunction: IrSimpleFunction, - callableSignature: CallableSignature + callableSignature: CallableSignature, + swiftExport: Set, ): IrBlockBody = DeclarationIrBuilder( generatorContext = this, symbol = function.symbol, ).irBlockBody { val coroutineScope = irTemporary(irCallCoroutineScope(originalFunction, function)) var expression = irCallOriginalFunction(originalFunction, function) - if (callableSignature.returnType is CallableSignature.Type.Flow) { - expression = irCallAsNativeFlow(expression, coroutineScope) - } - if (callableSignature.isSuspend) { - expression = irCallNativeSuspend(expression, coroutineScope) + if (SwiftExport.NO_FUNC_RETURN_TYPES !in swiftExport) { + if (callableSignature.returnType is CallableSignature.Type.Flow) { + expression = irCallAsNativeFlow(expression, coroutineScope) + } + if (callableSignature.isSuspend) { + expression = irCallNativeSuspend(expression, coroutineScope) + } } +irReturn(irGet(expression)) } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeProperty.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeProperty.kt index 8738b143..0d89ab67 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeProperty.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/codegen/NativeProperty.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.ir.codegen +import com.rickclephas.kmp.nativecoroutines.compiler.config.SwiftExport import com.rickclephas.kmp.nativecoroutines.compiler.ir.utils.IrBlockBodyExpression.Companion.irGet import com.rickclephas.kmp.nativecoroutines.compiler.utils.CallableSignature import org.jetbrains.kotlin.backend.common.lower.DeclarationIrBuilder @@ -13,7 +14,8 @@ import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI internal fun GeneratorContext.buildNativePropertyGetterBody( function: IrSimpleFunction, originalProperty: IrProperty, - callableSignature: CallableSignature + callableSignature: CallableSignature, + swiftExport: Set, ): IrBlockBody = DeclarationIrBuilder( generatorContext = this, symbol = function.symbol, @@ -22,8 +24,10 @@ internal fun GeneratorContext.buildNativePropertyGetterBody( require(originalGetter != null) val coroutineScope = irTemporary(irCallCoroutineScope(originalGetter, function)) var expression = irCallOriginalPropertyGetter(originalGetter, function) - if (callableSignature.returnType is CallableSignature.Type.Flow) { - expression = irCallAsNativeFlow(expression, coroutineScope) + if (SwiftExport.NO_FUNC_RETURN_TYPES !in swiftExport) { + if (callableSignature.returnType is CallableSignature.Type.Flow) { + expression = irCallAsNativeFlow(expression, coroutineScope) + } } +irReturn(irGet(expression)) } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrGenerationExtension.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrGenerationExtension.kt index 3678dd88..8028c480 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrGenerationExtension.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrGenerationExtension.kt @@ -2,11 +2,14 @@ package com.rickclephas.kmp.nativecoroutines.compiler.ir.extensions import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext +import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.ir.visitors.acceptVoid -internal class KmpNativeCoroutinesIrGenerationExtension: IrGenerationExtension { +internal class KmpNativeCoroutinesIrGenerationExtension( + private val configuration: CompilerConfiguration +): IrGenerationExtension { override fun generate(moduleFragment: IrModuleFragment, pluginContext: IrPluginContext) { - moduleFragment.acceptVoid(KmpNativeCoroutinesIrTransformer(pluginContext)) + moduleFragment.acceptVoid(KmpNativeCoroutinesIrTransformer(pluginContext, configuration)) } } diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrTransformer.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrTransformer.kt index 6bf980fe..40f6b8b8 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrTransformer.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/ir/extensions/KmpNativeCoroutinesIrTransformer.kt @@ -1,11 +1,13 @@ package com.rickclephas.kmp.nativecoroutines.compiler.ir.extensions +import com.rickclephas.kmp.nativecoroutines.compiler.config.* import com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey import com.rickclephas.kmp.nativecoroutines.compiler.ir.codegen.* import com.rickclephas.kmp.nativecoroutines.compiler.ir.codegen.GeneratorContext import com.rickclephas.kmp.nativecoroutines.compiler.ir.codegen.buildNativeFunctionBody import com.rickclephas.kmp.nativecoroutines.compiler.ir.codegen.buildStateFlowValueGetterBody import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext +import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.IrCallableReference @@ -21,9 +23,11 @@ import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid @OptIn(UnsafeDuringIrConstructionAPI::class) internal class KmpNativeCoroutinesIrTransformer( pluginContext: IrPluginContext, + configuration: CompilerConfiguration, ): IrVisitorVoid() { private val context = GeneratorContext(pluginContext) + private val swiftExport = configuration[SWIFT_EXPORT] private val IrDeclaration.nativeCoroutinesDeclarationKey: NativeCoroutinesDeclarationKey? get() { val origin = origin @@ -54,7 +58,8 @@ internal class KmpNativeCoroutinesIrTransformer( NativeCoroutinesDeclarationKey.Type.NATIVE -> context.buildNativeFunctionBody( function = declaration, originalFunction = function.owner, - callableSignature = declarationKey.callableSignature + callableSignature = declarationKey.callableSignature, + swiftExport = swiftExport, ) else -> error("Unsupported type $type for native coroutines function") } @@ -69,7 +74,8 @@ internal class KmpNativeCoroutinesIrTransformer( NativeCoroutinesDeclarationKey.Type.NATIVE -> context.buildNativePropertyGetterBody( function = getter, originalProperty = property.owner, - callableSignature = declarationKey.callableSignature + callableSignature = declarationKey.callableSignature, + swiftExport = swiftExport, ) NativeCoroutinesDeclarationKey.Type.STATE_FLOW_VALUE -> context.buildStateFlowValueGetterBody( property = declaration, From 1e26e0a0b5108746cced090ed858463093e12a14 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 16:35:13 +0100 Subject: [PATCH 04/18] Disable unsupported code in sample when using Swift export --- .../Async/AsyncFunctionIntegrationTests.swift | 12 ++++++++++ .../Async/AsyncResultIntegrationTests.swift | 12 ++++++++++ .../Async/AsyncSequenceIntegrationTests.swift | 14 ++++++++++++ sample/Async/ClockAsyncViewModel.swift | 2 ++ .../Async/RandomLettersAsyncViewModel.swift | 2 ++ sample/Async/SwiftUIAsyncTest.swift | 4 ++++ sample/Combine/ClockCombineViewModel.swift | 2 ++ .../CombineFutureIntegrationTests.swift | 16 ++++++++++++++ .../CombinePublisherIntegrationTests.swift | 18 +++++++++++++++ .../RandomLettersCombineViewModel.swift | 2 ++ .../CompilerIntegrationTests.swift | 22 ++++++++++++++++++- .../NewMemoryModelIntegrationTests.swift | 4 +++- .../project.pbxproj | 18 +++++++++++++++ sample/KotlinTypeAliases.swift | 22 +++++++++++++++++++ sample/RxSwift/ClockRxSwiftViewModel.swift | 2 ++ .../RandomLettersRxSwiftViewModel.swift | 2 ++ .../RxSwiftObservableIntegrationTests.swift | 14 ++++++++++++ .../RxSwiftSingleIntegrationTests.swift | 16 ++++++++++++++ sample/UI/RootView.swift | 2 +- 19 files changed, 183 insertions(+), 3 deletions(-) create mode 100644 sample/KotlinTypeAliases.swift diff --git a/sample/Async/AsyncFunctionIntegrationTests.swift b/sample/Async/AsyncFunctionIntegrationTests.swift index c3bc3c2d..a36ecf3b 100644 --- a/sample/Async/AsyncFunctionIntegrationTests.swift +++ b/sample/Async/AsyncFunctionIntegrationTests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class AsyncFunctionIntegrationTests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValueReceived() async throws { let integrationTests = SuspendIntegrationTests() let sendValue = randomInt() @@ -18,14 +19,18 @@ class AsyncFunctionIntegrationTests: XCTestCase { XCTAssertEqual(value.int32Value, sendValue, "Received incorrect value") await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNilValueReceived() async throws { let integrationTests = SuspendIntegrationTests() let value = try await asyncFunction(for: integrationTests.returnNull(delay: 1000)) XCTAssertNil(value, "Value should be nil") await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testExceptionReceived() async { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -40,7 +45,9 @@ class AsyncFunctionIntegrationTests: XCTestCase { } await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testErrorReceived() async { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -55,7 +62,9 @@ class AsyncFunctionIntegrationTests: XCTestCase { } await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testCancellation() async { let integrationTests = SuspendIntegrationTests() let handle = Task { @@ -76,10 +85,13 @@ class AsyncFunctionIntegrationTests: XCTestCase { XCTFail("Function should fail with an error") } } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testUnitReturnType() async throws { let integrationTests = SuspendIntegrationTests() try await asyncFunction(for: integrationTests.returnUnit(delay: 100)) await assertJobCompleted(integrationTests) } + #endif } diff --git a/sample/Async/AsyncResultIntegrationTests.swift b/sample/Async/AsyncResultIntegrationTests.swift index f584f0f0..6efdeaa1 100644 --- a/sample/Async/AsyncResultIntegrationTests.swift +++ b/sample/Async/AsyncResultIntegrationTests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class AsyncResultIntegrationTests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValueReceived() async { let integrationTests = SuspendIntegrationTests() let sendValue = randomInt() @@ -22,7 +23,9 @@ class AsyncResultIntegrationTests: XCTestCase { XCTAssertEqual(value.int32Value, sendValue, "Received incorrect value") await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNilValueReceived() async { let integrationTests = SuspendIntegrationTests() let result = await asyncResult(for: integrationTests.returnNull(delay: 1000)) @@ -33,7 +36,9 @@ class AsyncResultIntegrationTests: XCTestCase { XCTAssertNil(value, "Value should be nil") await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testExceptionReceived() async { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -48,7 +53,9 @@ class AsyncResultIntegrationTests: XCTestCase { XCTAssertTrue(exception is KotlinException, "Error doesn't contain the Kotlin exception") await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testErrorReceived() async { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -63,7 +70,9 @@ class AsyncResultIntegrationTests: XCTestCase { XCTAssertTrue(exception is KotlinThrowable, "Error doesn't contain the Kotlin error") await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testCancellation() async { let integrationTests = SuspendIntegrationTests() let handle = Task { @@ -88,7 +97,9 @@ class AsyncResultIntegrationTests: XCTestCase { XCTFail("Function should fail with an error") } } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testUnitReturnType() async throws { let integrationTests = SuspendIntegrationTests() let result = await asyncResult(for: integrationTests.returnUnit(delay: 100)) @@ -98,4 +109,5 @@ class AsyncResultIntegrationTests: XCTestCase { } await assertJobCompleted(integrationTests) } + #endif } diff --git a/sample/Async/AsyncSequenceIntegrationTests.swift b/sample/Async/AsyncSequenceIntegrationTests.swift index 557e3de0..6ee37634 100644 --- a/sample/Async/AsyncSequenceIntegrationTests.swift +++ b/sample/Async/AsyncSequenceIntegrationTests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class AsyncSequenceIntegrationTests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValuesReceived() async { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -32,7 +33,9 @@ class AsyncSequenceIntegrationTests: XCTestCase { } await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValueBackPressure() async { let integrationTests = FlowIntegrationTests() let sendValueCount: Int32 = 10 @@ -52,7 +55,9 @@ class AsyncSequenceIntegrationTests: XCTestCase { } await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNilValueReceived() async { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -79,7 +84,9 @@ class AsyncSequenceIntegrationTests: XCTestCase { } await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testExceptionReceived() async { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -102,7 +109,9 @@ class AsyncSequenceIntegrationTests: XCTestCase { await assertJobCompleted(integrationTests) XCTAssertEqual(receivedValueCount, exceptionIndex, "Should have received all values before the exception") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testErrorReceived() async { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -125,7 +134,9 @@ class AsyncSequenceIntegrationTests: XCTestCase { await assertJobCompleted(integrationTests) XCTAssertEqual(receivedValueCount, errorIndex, "Should have received all values before the error") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testCancellation() async { let integrationTests = FlowIntegrationTests() let handle = Task { @@ -147,7 +158,9 @@ class AsyncSequenceIntegrationTests: XCTestCase { await handle.value await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testImplicitCancellation() async { let integrationTests = FlowIntegrationTests() let handle = Task { @@ -165,4 +178,5 @@ class AsyncSequenceIntegrationTests: XCTestCase { await handle.value await assertJobCompleted(integrationTests) } + #endif } diff --git a/sample/Async/ClockAsyncViewModel.swift b/sample/Async/ClockAsyncViewModel.swift index 49e63000..ba82cd09 100644 --- a/sample/Async/ClockAsyncViewModel.swift +++ b/sample/Async/ClockAsyncViewModel.swift @@ -27,6 +27,7 @@ class ClockAsyncViewModel: ClockViewModel { func startMonitoring() { let clock = clock + #if !NATIVE_COROUTINES_SWIFT_EXPORT task = Task { [weak self] in let timeSequence = asyncSequence(for: clock.time) .map { [weak self] time -> String in @@ -44,6 +45,7 @@ class ClockAsyncViewModel: ClockViewModel { } self?.task = nil } + #endif } func stopMonitoring() { diff --git a/sample/Async/RandomLettersAsyncViewModel.swift b/sample/Async/RandomLettersAsyncViewModel.swift index 7dc960de..696052e2 100644 --- a/sample/Async/RandomLettersAsyncViewModel.swift +++ b/sample/Async/RandomLettersAsyncViewModel.swift @@ -18,6 +18,7 @@ class RandomLettersAsyncViewModel: RandomLettersViewModel { private let randomLettersGenerator = RandomLettersGenerator() func loadRandomLetters(throwException: Bool) { + #if !NATIVE_COROUTINES_SWIFT_EXPORT Task { isLoading = true result = nil @@ -29,5 +30,6 @@ class RandomLettersAsyncViewModel: RandomLettersViewModel { } isLoading = false } + #endif } } diff --git a/sample/Async/SwiftUIAsyncTest.swift b/sample/Async/SwiftUIAsyncTest.swift index 02c31c5d..41e35e95 100644 --- a/sample/Async/SwiftUIAsyncTest.swift +++ b/sample/Async/SwiftUIAsyncTest.swift @@ -19,20 +19,24 @@ struct SwiftUIAsyncTest: View { }.refreshable { print("Refreshable started") + #if !NATIVE_COROUTINES_SWIFT_EXPORT do { let result = try await asyncFunction(for: tests.returnValue(value: 20, delay: 10000)) print("Refreshable result: \(result)") } catch { print("Refreshable error: \(error)") } + #endif }.task { print("Task started") + #if !NATIVE_COROUTINES_SWIFT_EXPORT do { let result = try await asyncFunction(for: tests.returnValue(value: 2, delay: 10000)) print("Task result: \(result)") } catch { print("Task error: \(error)") } + #endif } } diff --git a/sample/Combine/ClockCombineViewModel.swift b/sample/Combine/ClockCombineViewModel.swift index 72423392..b566c392 100644 --- a/sample/Combine/ClockCombineViewModel.swift +++ b/sample/Combine/ClockCombineViewModel.swift @@ -27,6 +27,7 @@ class ClockCombineViewModel: ClockViewModel { } func startMonitoring() { + #if !NATIVE_COROUTINES_SWIFT_EXPORT cancellable = createPublisher(for: clock.time) // Convert the seconds since EPOCH to a string in the format "HH:mm:ss" .map { [weak self] time -> String in @@ -41,6 +42,7 @@ class ClockCombineViewModel: ClockViewModel { .sink { [weak self] time in self?.time = time } + #endif } func stopMonitoring() { diff --git a/sample/Combine/CombineFutureIntegrationTests.swift b/sample/Combine/CombineFutureIntegrationTests.swift index 5120123b..c844b592 100644 --- a/sample/Combine/CombineFutureIntegrationTests.swift +++ b/sample/Combine/CombineFutureIntegrationTests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class CombineFutureIntegrationTests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValueReceived() { let integrationTests = SuspendIntegrationTests() let sendValue = randomInt() @@ -32,7 +33,9 @@ class CombineFutureIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNilValueReceived() { let integrationTests = SuspendIntegrationTests() let future = createFuture(for: integrationTests.returnNull(delay: 1000)) @@ -53,7 +56,9 @@ class CombineFutureIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testExceptionReceived() { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -79,7 +84,9 @@ class CombineFutureIntegrationTests: XCTestCase { wait(for: [valueExpectation, completionExpectation], timeout: 3) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testErrorReceived() { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -105,7 +112,9 @@ class CombineFutureIntegrationTests: XCTestCase { wait(for: [valueExpectation, completionExpectation], timeout: 3) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNotOnMainThread() { let integrationTests = SuspendIntegrationTests() let future = createFuture(for: integrationTests.returnValue(value: 1, delay: 1000)) @@ -122,7 +131,9 @@ class CombineFutureIntegrationTests: XCTestCase { _ = cancellable // This is just to remove the unused variable warning wait(for: [valueExpectation, completionExpectation], timeout: 3) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testCancellation() { let integrationTests = SuspendIntegrationTests() let callbackExpectation = expectation(description: "Waiting for callback not to get called") @@ -148,7 +159,9 @@ class CombineFutureIntegrationTests: XCTestCase { wait(for: [callbackExpectation, valueExpectation, completionExpectation], timeout: 3) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValuesReceived() { let integrationTests = SuspendIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -173,7 +186,9 @@ class CombineFutureIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testUnitReturnType() { let integrationTests = SuspendIntegrationTests() let future = createFuture(for: integrationTests.returnUnit(delay: 100)) @@ -193,4 +208,5 @@ class CombineFutureIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif } diff --git a/sample/Combine/CombinePublisherIntegrationTests.swift b/sample/Combine/CombinePublisherIntegrationTests.swift index 947c0e46..5b5a45be 100644 --- a/sample/Combine/CombinePublisherIntegrationTests.swift +++ b/sample/Combine/CombinePublisherIntegrationTests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class CombinePublisherIntegrationTests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValuesReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -35,7 +36,9 @@ class CombinePublisherIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT @available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) func testValueBackPressure() async { let integrationTests = FlowIntegrationTests() @@ -56,7 +59,9 @@ class CombinePublisherIntegrationTests: XCTestCase { } await assertJobCompleted(integrationTests) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNilValueReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -86,7 +91,9 @@ class CombinePublisherIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testExceptionReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -115,7 +122,9 @@ class CombinePublisherIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testErrorReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -144,7 +153,9 @@ class CombinePublisherIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNotOnMainThread() { let integrationTests = FlowIntegrationTests() let publisher = createPublisher(for: integrationTests.getFlow(count: 1, delay: 1000)) @@ -161,7 +172,9 @@ class CombinePublisherIntegrationTests: XCTestCase { _ = cancellable // This is just to remove the unused variable warning wait(for: [valueExpectation, completionExpectation], timeout: 3) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testCancellation() { let integrationTests = FlowIntegrationTests() let callbackExpectation = expectation(description: "Waiting for callback not to get called") @@ -186,7 +199,9 @@ class CombinePublisherIntegrationTests: XCTestCase { wait(for: [callbackExpectation, completionExpectation], timeout: 2) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testThreadLock() { let integrationTests = ThreadLockIntegrationTests() let publisher = createPublisher(for: integrationTests.stateFlow) @@ -198,7 +213,9 @@ class CombinePublisherIntegrationTests: XCTestCase { wait(for: [valuesExpectation], timeout: 6) cancellable.cancel() } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testUnitValues() { let integrationTests = FlowIntegrationTests() let publisher = createPublisher(for: integrationTests.getUnitFlow(count: 2, delay: 100)) @@ -221,4 +238,5 @@ class CombinePublisherIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif } diff --git a/sample/Combine/RandomLettersCombineViewModel.swift b/sample/Combine/RandomLettersCombineViewModel.swift index e6114f20..68021cf1 100644 --- a/sample/Combine/RandomLettersCombineViewModel.swift +++ b/sample/Combine/RandomLettersCombineViewModel.swift @@ -22,6 +22,7 @@ class RandomLettersCombineViewModel: RandomLettersViewModel { func loadRandomLetters(throwException: Bool) { isLoading = true result = nil + #if !NATIVE_COROUTINES_SWIFT_EXPORT createFuture(for: randomLettersGenerator.getRandomLetters(throwException: throwException)) // Update the UI on the main thread .receive(on: DispatchQueue.main) @@ -33,5 +34,6 @@ class RandomLettersCombineViewModel: RandomLettersViewModel { } receiveValue: { [weak self] word in self?.result = .success(word) }.store(in: &cancellables) + #endif } } diff --git a/sample/IntegrationTests/CompilerIntegrationTests.swift b/sample/IntegrationTests/CompilerIntegrationTests.swift index 867cd48f..7767d651 100644 --- a/sample/IntegrationTests/CompilerIntegrationTests.swift +++ b/sample/IntegrationTests/CompilerIntegrationTests.swift @@ -11,8 +11,13 @@ import NativeCoroutinesSampleShared class CompilerIntegrationTests: XCTestCase { - private typealias IntegrationTests = NativeCoroutinesSampleShared.CompilerIntegrationTests + #if NATIVE_COROUTINES_SWIFT_EXPORT + private typealias IntegrationTests = KotlinCompilerIntegrationTests + #else + private typealias IntegrationTests = KotlinCompilerIntegrationTests + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnGenericClassValue() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for value") @@ -24,7 +29,9 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnDefaultValue() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for value") @@ -36,7 +43,9 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnGenericValue() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for value") @@ -48,7 +57,9 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnConstrainedGenericValue() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for value") @@ -60,7 +71,9 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnGenericValues() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for values") @@ -72,7 +85,9 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnGenericVarargValues() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for values") @@ -89,7 +104,9 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnGenericValueFromExtension() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for value") @@ -101,7 +118,9 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnGenericFlow() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for value") @@ -113,4 +132,5 @@ class CompilerIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif } diff --git a/sample/IntegrationTests/NewMemoryModelIntegrationTests.swift b/sample/IntegrationTests/NewMemoryModelIntegrationTests.swift index c2e62448..cd32bc7c 100644 --- a/sample/IntegrationTests/NewMemoryModelIntegrationTests.swift +++ b/sample/IntegrationTests/NewMemoryModelIntegrationTests.swift @@ -11,8 +11,9 @@ import NativeCoroutinesSampleShared class NewMemoryModelIntegrationTests: XCTestCase { - private typealias IntegrationTests = NativeCoroutinesSampleShared.NewMemoryModelIntegrationTests + private typealias IntegrationTests = KotlinNewMemoryModelIntegrationTests + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnMutableData() { let integrationTests = IntegrationTests() let valueExpectation = expectation(description: "Waiting for value") @@ -31,4 +32,5 @@ class NewMemoryModelIntegrationTests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 1) } + #endif } diff --git a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj index 0b132de9..d5da7d69 100644 --- a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj +++ b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj @@ -147,6 +147,14 @@ 1DBD717A2D776AC7000BE3B5 /* GH206Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DBD71782D776A59000BE3B5 /* GH206Tests.swift */; }; 1DBD717B2D776AC7000BE3B5 /* GH206Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DBD71782D776A59000BE3B5 /* GH206Tests.swift */; }; 1DBD717C2D776AC7000BE3B5 /* GH206Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DBD71782D776A59000BE3B5 /* GH206Tests.swift */; }; + 1DEEC4532EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; + 1DEEC4542EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; + 1DEEC4552EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; + 1DEEC4562EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; + 1DEEC4572EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; + 1DEEC4582EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; + 1DEEC4592EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; + 1DEEC45A2EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */; }; 1DF1A66C2671448500945FF9 /* RootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DF1A66B2671448500945FF9 /* RootView.swift */; }; 1DF1A66D2671448500945FF9 /* RootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DF1A66B2671448500945FF9 /* RootView.swift */; }; 1DF1A66F2671494800945FF9 /* NavigationBarTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DF1A66E2671494800945FF9 /* NavigationBarTitle.swift */; }; @@ -295,6 +303,7 @@ 1D81B1592677EDE600EEC34D /* CombinePublisherIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CombinePublisherIntegrationTests.swift; sourceTree = ""; }; 1DA5DD0526764810002448E3 /* RandomLettersAsyncViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomLettersAsyncViewModel.swift; sourceTree = ""; }; 1DBD71782D776A59000BE3B5 /* GH206Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GH206Tests.swift; sourceTree = ""; }; + 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KotlinTypeAliases.swift; sourceTree = ""; }; 1DF1A66B2671448500945FF9 /* RootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootView.swift; sourceTree = ""; }; 1DF1A66E2671494800945FF9 /* NavigationBarTitle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationBarTitle.swift; sourceTree = ""; }; 1DF1A67126714EEC00945FF9 /* RandomLettersViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomLettersViewModel.swift; sourceTree = ""; }; @@ -424,6 +433,7 @@ 1D04AED6266E966900920D20 = { isa = PBXGroup; children = ( + 1DEEC4522EB65A58008777F8 /* KotlinTypeAliases.swift */, 1DBD71772D776A4E000BE3B5 /* Issues */, 1D75A330272C85BA00CFF795 /* Packages */, 1DA5DD04267647F6002448E3 /* Async */, @@ -1180,6 +1190,7 @@ 1D63BF6226E3E242003363BE /* RandomLettersCombineViewModel.swift in Sources */, 1D4F36C226E5031500F7C772 /* SwiftUIAsyncTest.swift in Sources */, 1D63BF6E26E3E266003363BE /* RandomLettersView.swift in Sources */, + 1DEEC4572EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1D63BF6526E3E24A003363BE /* ClockRxSwiftViewModel.swift in Sources */, 1D63BF6A26E3E25B003363BE /* ClockViewModel.swift in Sources */, ); @@ -1196,6 +1207,7 @@ 1D63BF6726E3E24F003363BE /* RxSwiftSingleIntegrationTests.swift in Sources */, 1DBD717B2D776AC7000BE3B5 /* GH206Tests.swift in Sources */, 1D4F36C526E5032400F7C772 /* AsyncSequenceIntegrationTests.swift in Sources */, + 1DEEC4582EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1D4F36BF26E5030600F7C772 /* TestUtils.swift in Sources */, 1D103F152747FFBB001567CA /* AsyncTestUtils.swift in Sources */, 1D4F36BE26E5030400F7C772 /* CompilerIntegrationTests.swift in Sources */, @@ -1209,6 +1221,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1DEEC4592EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1D4F36B326E5001200F7C772 /* RandomLettersAsyncViewModel.swift in Sources */, 1D63BF9126E4F009003363BE /* ComplicationController.swift in Sources */, 1D63BFCC26E4F0F1003363BE /* NavigationBarTitle.swift in Sources */, @@ -1239,6 +1252,7 @@ 1DF2860327370061004DD6D2 /* NewMemoryModelIntegrationTests.swift in Sources */, 1DBD717C2D776AC7000BE3B5 /* GH206Tests.swift in Sources */, 1D63BFC826E4F0E5003363BE /* RxSwiftObservableIntegrationTests.swift in Sources */, + 1DEEC45A2EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1D63BFC426E4F0D8003363BE /* CombinePublisherIntegrationTests.swift in Sources */, 1D103F162747FFBB001567CA /* AsyncTestUtils.swift in Sources */, 1D63BFC726E4F0E2003363BE /* RxSwiftSingleIntegrationTests.swift in Sources */, @@ -1264,6 +1278,7 @@ 1D5DAF802698C3C30059D4B8 /* RandomLettersRxSwiftViewModel.swift in Sources */, 1DF82A77267939F70024886B /* SwiftUIAsyncTest.swift in Sources */, 1DF1A66C2671448500945FF9 /* RootView.swift in Sources */, + 1DEEC4532EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1DF1A67526714FBD00945FF9 /* RandomLettersView.swift in Sources */, 1D5DAF7D2698B5EB0059D4B8 /* ClockRxSwiftViewModel.swift in Sources */, ); @@ -1278,6 +1293,7 @@ 1D5DAF812698C3C30059D4B8 /* RandomLettersRxSwiftViewModel.swift in Sources */, 1D717616267009E700846F75 /* AppDelegate.swift in Sources */, 1DF1A6702671494800945FF9 /* NavigationBarTitle.swift in Sources */, + 1DEEC4542EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1DF1A67626714FBD00945FF9 /* RandomLettersView.swift in Sources */, 1D71763126700A6E00846F75 /* ClockView.swift in Sources */, 1DF1A6792671535200945FF9 /* RandomLettersCombineViewModel.swift in Sources */, @@ -1302,6 +1318,7 @@ 1D0CA84D2677F6DB0000D612 /* AsyncFunctionIntegrationTests.swift in Sources */, 1DBD71792D776AC7000BE3B5 /* GH206Tests.swift in Sources */, 1D81B15A2677EDE600EEC34D /* CombinePublisherIntegrationTests.swift in Sources */, + 1DEEC4552EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1DF2860027370061004DD6D2 /* NewMemoryModelIntegrationTests.swift in Sources */, 1D103F132747FFBB001567CA /* AsyncTestUtils.swift in Sources */, 1D5DAF862698CA040059D4B8 /* RxSwiftObservableIntegrationTests.swift in Sources */, @@ -1322,6 +1339,7 @@ 1D0CA84E2677F6DB0000D612 /* AsyncFunctionIntegrationTests.swift in Sources */, 1DBD717A2D776AC7000BE3B5 /* GH206Tests.swift in Sources */, 1D81B15B2677EDE600EEC34D /* CombinePublisherIntegrationTests.swift in Sources */, + 1DEEC4562EB65A6E008777F8 /* KotlinTypeAliases.swift in Sources */, 1DF2860127370061004DD6D2 /* NewMemoryModelIntegrationTests.swift in Sources */, 1D103F142747FFBB001567CA /* AsyncTestUtils.swift in Sources */, 1D5DAF872698CA040059D4B8 /* RxSwiftObservableIntegrationTests.swift in Sources */, diff --git a/sample/KotlinTypeAliases.swift b/sample/KotlinTypeAliases.swift new file mode 100644 index 00000000..bdf87995 --- /dev/null +++ b/sample/KotlinTypeAliases.swift @@ -0,0 +1,22 @@ +// +// KotlinTypeAliases.swift +// KMPNativeCoroutinesSample +// +// Created by Rick Clephas on 01/11/2025. +// + +import NativeCoroutinesSampleShared + +#if NATIVE_COROUTINES_SWIFT_EXPORT + +typealias KotlinCompilerIntegrationTests = NativeCoroutinesSampleShared.tests.CompilerIntegrationTests +typealias KotlinNewMemoryModelIntegrationTests = NativeCoroutinesSampleShared.tests.NewMemoryModelIntegrationTests +typealias KotlinSuspendIntegrationTests = NativeCoroutinesSampleShared.tests.SuspendIntegrationTests + +#else + +typealias KotlinCompilerIntegrationTests = NativeCoroutinesSampleShared.CompilerIntegrationTests +typealias KotlinNewMemoryModelIntegrationTests = NativeCoroutinesSampleShared.NewMemoryModelIntegrationTests +typealias KotlinSuspendIntegrationTests = NativeCoroutinesSampleShared.SuspendIntegrationTests + +#endif diff --git a/sample/RxSwift/ClockRxSwiftViewModel.swift b/sample/RxSwift/ClockRxSwiftViewModel.swift index b4985265..395428fd 100644 --- a/sample/RxSwift/ClockRxSwiftViewModel.swift +++ b/sample/RxSwift/ClockRxSwiftViewModel.swift @@ -27,6 +27,7 @@ class ClockRxSwiftViewModel: ClockViewModel { } func startMonitoring() { + #if !NATIVE_COROUTINES_SWIFT_EXPORT disposable = createObservable(for: clock.time) // Convert the seconds since EPOCH to a string in the format "HH:mm:ss" .map { [weak self] time -> String in @@ -42,6 +43,7 @@ class ClockRxSwiftViewModel: ClockViewModel { // Replace any errors with a text message :) self?.time = "Ohno error!" }) + #endif } func stopMonitoring() { diff --git a/sample/RxSwift/RandomLettersRxSwiftViewModel.swift b/sample/RxSwift/RandomLettersRxSwiftViewModel.swift index f0d2b518..f77a7eec 100644 --- a/sample/RxSwift/RandomLettersRxSwiftViewModel.swift +++ b/sample/RxSwift/RandomLettersRxSwiftViewModel.swift @@ -21,6 +21,7 @@ class RandomLettersRxSwiftViewModel: RandomLettersViewModel { func loadRandomLetters(throwException: Bool) { isLoading = true result = nil + #if !NATIVE_COROUTINES_SWIFT_EXPORT _ = createSingle(for: randomLettersGenerator.getRandomLetters(throwException: throwException)) // Update the UI on the main thread .observe(on: MainScheduler.instance) @@ -31,5 +32,6 @@ class RandomLettersRxSwiftViewModel: RandomLettersViewModel { }, onDisposed: { [weak self] in self?.isLoading = false }) + #endif } } diff --git a/sample/RxSwift/RxSwiftObservableIntegrationTests.swift b/sample/RxSwift/RxSwiftObservableIntegrationTests.swift index c77034b9..da82d95b 100644 --- a/sample/RxSwift/RxSwiftObservableIntegrationTests.swift +++ b/sample/RxSwift/RxSwiftObservableIntegrationTests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class RxSwiftObservableIntegrationTests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValuesReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -37,7 +38,9 @@ class RxSwiftObservableIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNilValueReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -69,7 +72,9 @@ class RxSwiftObservableIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testExceptionReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -100,7 +105,9 @@ class RxSwiftObservableIntegrationTests: XCTestCase { wait(for: [valuesExpectation, errorExpectation, completionExpectation, disposedExpectation], timeout: 4) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testErrorReceived() { let integrationTests = FlowIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -131,7 +138,9 @@ class RxSwiftObservableIntegrationTests: XCTestCase { wait(for: [valuesExpectation, errorExpectation, completionExpectation, disposedExpectation], timeout: 4) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNotOnMainThread() { let integrationTests = FlowIntegrationTests() let observable = createObservable(for: integrationTests.getFlow(count: 1, delay: 1000)) @@ -152,7 +161,9 @@ class RxSwiftObservableIntegrationTests: XCTestCase { _ = disposable // This is just to remove the unused variable warning wait(for: [valueExpectation, completionExpectation, disposedExpectation], timeout: 3) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testCancellation() { let integrationTests = FlowIntegrationTests() let callbackExpectation = expectation(description: "Waiting for callback not to get called") @@ -184,7 +195,9 @@ class RxSwiftObservableIntegrationTests: XCTestCase { wait(for: [callbackExpectation, errorExpectation, completionExpectation, disposedExpectation], timeout: 2) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testUnitValues() { let integrationTests = FlowIntegrationTests() let observable = createObservable(for: integrationTests.getUnitFlow(count: 2, delay: 100)) @@ -209,4 +222,5 @@ class RxSwiftObservableIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif } diff --git a/sample/RxSwift/RxSwiftSingleIntegrationTests.swift b/sample/RxSwift/RxSwiftSingleIntegrationTests.swift index acf79f58..dd374dda 100644 --- a/sample/RxSwift/RxSwiftSingleIntegrationTests.swift +++ b/sample/RxSwift/RxSwiftSingleIntegrationTests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class RxSwiftSingleIntegrationTests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValueReceived() { let integrationTests = SuspendIntegrationTests() let sendValue = randomInt() @@ -31,7 +32,9 @@ class RxSwiftSingleIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNilValueReceived() { let integrationTests = SuspendIntegrationTests() let single = createSingle(for: integrationTests.returnNull(delay: 1000)) @@ -51,7 +54,9 @@ class RxSwiftSingleIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testExceptionReceived() { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -76,7 +81,9 @@ class RxSwiftSingleIntegrationTests: XCTestCase { wait(for: [valueExpectation, errorExpectation, disposedExpectation], timeout: 3) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testErrorReceived() { let integrationTests = SuspendIntegrationTests() let sendMessage = randomString() @@ -101,7 +108,9 @@ class RxSwiftSingleIntegrationTests: XCTestCase { wait(for: [valueExpectation, errorExpectation, disposedExpectation], timeout: 3) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testNotOnMainThread() { let integrationTests = SuspendIntegrationTests() let single = createSingle(for: integrationTests.returnValue(value: 1, delay: 1000)) @@ -118,7 +127,9 @@ class RxSwiftSingleIntegrationTests: XCTestCase { _ = disposable // This is just to remove the unused variable warning wait(for: [valueExpectation, disposedExpectation], timeout: 3) } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testCancellation() { let integrationTests = SuspendIntegrationTests() let callbackExpectation = expectation(description: "Waiting for callback not to get called") @@ -147,7 +158,9 @@ class RxSwiftSingleIntegrationTests: XCTestCase { wait(for: [callbackExpectation, valueExpectation, errorExpectation, disposedExpectation], timeout: 3) XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testValuesReceived() { let integrationTests = SuspendIntegrationTests() let sendValueCount = randomInt(min: 5, max: 20) @@ -174,7 +187,9 @@ class RxSwiftSingleIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testUnitReturnType() { let integrationTests = SuspendIntegrationTests() let single = createSingle(for: integrationTests.returnUnit(delay: 1000)) @@ -193,4 +208,5 @@ class RxSwiftSingleIntegrationTests: XCTestCase { delay(1) // Delay is needed else the job isn't completed yet XCTAssertEqual(integrationTests.uncompletedJobCount, 0, "The job should have completed by now") } + #endif } diff --git a/sample/UI/RootView.swift b/sample/UI/RootView.swift index d9320143..8b6a3aa8 100644 --- a/sample/UI/RootView.swift +++ b/sample/UI/RootView.swift @@ -35,7 +35,7 @@ struct RootView: View { Text("Random letters") } if #available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) { - NavigationLink(destination: SwiftUIAsyncTest(tests: SuspendIntegrationTests())) { + NavigationLink(destination: SwiftUIAsyncTest(tests: KotlinSuspendIntegrationTests())) { Text("SwiftUI test") } } From 9a323fd1fd57f378d200c08373e997c2396aada3 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 16:36:03 +0100 Subject: [PATCH 05/18] Use .shared instead of constructor for objects --- sample/Async/ClockAsyncViewModel.swift | 2 +- sample/Async/RandomLettersAsyncViewModel.swift | 2 +- sample/Combine/ClockCombineViewModel.swift | 2 +- sample/Combine/RandomLettersCombineViewModel.swift | 2 +- sample/RxSwift/ClockRxSwiftViewModel.swift | 2 +- sample/RxSwift/RandomLettersRxSwiftViewModel.swift | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sample/Async/ClockAsyncViewModel.swift b/sample/Async/ClockAsyncViewModel.swift index ba82cd09..70b4ddd5 100644 --- a/sample/Async/ClockAsyncViewModel.swift +++ b/sample/Async/ClockAsyncViewModel.swift @@ -20,7 +20,7 @@ class ClockAsyncViewModel: ClockViewModel { formatter.setLocalizedDateFormatFromTemplate("HH:mm:ss") return formatter }() - private let clock = Clock() + private let clock = Clock.shared private var task: Task<(), Never>? = nil { didSet { isMonitoring = task != nil } } diff --git a/sample/Async/RandomLettersAsyncViewModel.swift b/sample/Async/RandomLettersAsyncViewModel.swift index 696052e2..1f2f8558 100644 --- a/sample/Async/RandomLettersAsyncViewModel.swift +++ b/sample/Async/RandomLettersAsyncViewModel.swift @@ -15,7 +15,7 @@ class RandomLettersAsyncViewModel: RandomLettersViewModel { @Published private(set) var result: Result? = nil @Published private(set) var isLoading: Bool = false - private let randomLettersGenerator = RandomLettersGenerator() + private let randomLettersGenerator = RandomLettersGenerator.shared func loadRandomLetters(throwException: Bool) { #if !NATIVE_COROUTINES_SWIFT_EXPORT diff --git a/sample/Combine/ClockCombineViewModel.swift b/sample/Combine/ClockCombineViewModel.swift index b566c392..92a88018 100644 --- a/sample/Combine/ClockCombineViewModel.swift +++ b/sample/Combine/ClockCombineViewModel.swift @@ -21,7 +21,7 @@ class ClockCombineViewModel: ClockViewModel { formatter.setLocalizedDateFormatFromTemplate("HH:mm:ss") return formatter }() - private let clock = Clock() + private let clock = Clock.shared private var cancellable: AnyCancellable? = nil { didSet { isMonitoring = cancellable != nil } } diff --git a/sample/Combine/RandomLettersCombineViewModel.swift b/sample/Combine/RandomLettersCombineViewModel.swift index 68021cf1..24908789 100644 --- a/sample/Combine/RandomLettersCombineViewModel.swift +++ b/sample/Combine/RandomLettersCombineViewModel.swift @@ -16,7 +16,7 @@ class RandomLettersCombineViewModel: RandomLettersViewModel { @Published private(set) var result: Result? = nil @Published private(set) var isLoading: Bool = false - private let randomLettersGenerator = RandomLettersGenerator() + private let randomLettersGenerator = RandomLettersGenerator.shared private var cancellables = Set() func loadRandomLetters(throwException: Bool) { diff --git a/sample/RxSwift/ClockRxSwiftViewModel.swift b/sample/RxSwift/ClockRxSwiftViewModel.swift index 395428fd..e006eff6 100644 --- a/sample/RxSwift/ClockRxSwiftViewModel.swift +++ b/sample/RxSwift/ClockRxSwiftViewModel.swift @@ -21,7 +21,7 @@ class ClockRxSwiftViewModel: ClockViewModel { formatter.setLocalizedDateFormatFromTemplate("HH:mm:ss") return formatter }() - private let clock = Clock() + private let clock = Clock.shared private var disposable: Disposable? = nil { didSet { isMonitoring = disposable != nil } } diff --git a/sample/RxSwift/RandomLettersRxSwiftViewModel.swift b/sample/RxSwift/RandomLettersRxSwiftViewModel.swift index f77a7eec..b13c64ff 100644 --- a/sample/RxSwift/RandomLettersRxSwiftViewModel.swift +++ b/sample/RxSwift/RandomLettersRxSwiftViewModel.swift @@ -16,7 +16,7 @@ class RandomLettersRxSwiftViewModel: RandomLettersViewModel { @Published private(set) var result: Result? = nil @Published private(set) var isLoading: Bool = false - private let randomLettersGenerator = RandomLettersGenerator() + private let randomLettersGenerator = RandomLettersGenerator.shared func loadRandomLetters(throwException: Bool) { isLoading = true From 05cec33f74707a351102d647ad4ef786cba165a9 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 19:47:35 +0100 Subject: [PATCH 06/18] Add Swift export codegen tests --- .../FirLightTreeCodegenTestGenerated.java | 41 + .../runners/FirPsiCodegenTestGenerated.java | 41 + .../KmpNativeCoroutinesDirectives.kt | 2 + .../runners/AbstractFirBaseCodegenTest.kt | 10 + ...iveCoroutinesCompilerPluginConfigurator.kt | 1 + .../testData/codegen/annotations.fir.ir.txt | 50 +- .../testData/codegen/annotations.fir.kt.txt | 30 +- .../src/testData/codegen/annotations.fir.txt | 30 +- .../src/testData/codegen/annotations.kt | 12 +- .../codegen/coroutinescope.fir.ir.txt | 82 +- .../codegen/coroutinescope.fir.kt.txt | 40 +- .../testData/codegen/coroutinescope.fir.txt | 40 +- .../src/testData/codegen/coroutinescope.kt | 16 +- .../src/testData/codegen/functions.fir.ir.txt | 192 ++- .../src/testData/codegen/functions.fir.kt.txt | 90 +- .../src/testData/codegen/functions.fir.txt | 90 +- .../src/testData/codegen/functions.kt | 36 +- .../codegen/swift1/annotations.box.txt | 1 + .../codegen/swift1/annotations.fir.ir.txt | 410 +++++ .../codegen/swift1/annotations.fir.kt.txt | 241 +++ .../codegen/swift1/annotations.fir.txt | 147 ++ .../testData/codegen/swift1/annotations.kt | 1 + .../codegen/swift1/coroutinescope.box.txt | 1 + .../codegen/swift1/coroutinescope.fir.ir.txt | 606 +++++++ .../codegen/swift1/coroutinescope.fir.kt.txt | 274 ++++ .../codegen/swift1/coroutinescope.fir.txt | 205 +++ .../testData/codegen/swift1/coroutinescope.kt | 1 + .../testData/codegen/swift1/functions.box.txt | 1 + .../codegen/swift1/functions.fir.ir.txt | 817 ++++++++++ .../codegen/swift1/functions.fir.kt.txt | 434 +++++ .../testData/codegen/swift1/functions.fir.txt | 319 ++++ .../src/testData/codegen/swift1/functions.kt | 1 + .../codegen/swift1/properties.box.txt | 1 + .../codegen/swift1/properties.fir.ir.txt | 1450 +++++++++++++++++ .../codegen/swift1/properties.fir.kt.txt | 660 ++++++++ .../codegen/swift1/properties.fir.txt | 447 +++++ .../src/testData/codegen/swift1/properties.kt | 1 + .../codegen/swift1/viewmodelscope.box.txt | 1 + .../codegen/swift1/viewmodelscope.fir.ir.txt | 452 +++++ .../codegen/swift1/viewmodelscope.fir.kt.txt | 227 +++ .../codegen/swift1/viewmodelscope.fir.txt | 170 ++ .../testData/codegen/swift1/viewmodelscope.kt | 1 + .../codegen/viewmodelscope.fir.ir.txt | 80 +- .../codegen/viewmodelscope.fir.kt.txt | 40 +- .../testData/codegen/viewmodelscope.fir.txt | 40 +- .../src/testData/codegen/viewmodelscope.kt | 16 +- .../kmp/nativecoroutines/BoxTest.kt | 73 +- 47 files changed, 7674 insertions(+), 247 deletions(-) create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.box.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.kt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.box.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.kt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.box.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.kt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.box.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.ir.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.kt.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.txt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.kt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.box.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt create mode 100644 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt create mode 120000 kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.kt diff --git a/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirLightTreeCodegenTestGenerated.java b/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirLightTreeCodegenTestGenerated.java index 7edc1ab3..7a966a88 100644 --- a/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirLightTreeCodegenTestGenerated.java +++ b/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirLightTreeCodegenTestGenerated.java @@ -6,6 +6,7 @@ import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import java.io.File; @@ -50,4 +51,44 @@ public void testProperties() { public void testViewmodelscope() { runTest("src/testData/codegen/viewmodelscope.kt"); } + + @Nested + @TestMetadata("src/testData/codegen/swift1") + @TestDataPath("$PROJECT_ROOT") + public class Swift1 { + @Test + public void testAllFilesPresentInSwift1() { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("src/testData/codegen/swift1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kt$"), TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotations.kt") + public void testAnnotations() { + runTest("src/testData/codegen/swift1/annotations.kt"); + } + + @Test + @TestMetadata("coroutinescope.kt") + public void testCoroutinescope() { + runTest("src/testData/codegen/swift1/coroutinescope.kt"); + } + + @Test + @TestMetadata("functions.kt") + public void testFunctions() { + runTest("src/testData/codegen/swift1/functions.kt"); + } + + @Test + @TestMetadata("properties.kt") + public void testProperties() { + runTest("src/testData/codegen/swift1/properties.kt"); + } + + @Test + @TestMetadata("viewmodelscope.kt") + public void testViewmodelscope() { + runTest("src/testData/codegen/swift1/viewmodelscope.kt"); + } + } } diff --git a/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirPsiCodegenTestGenerated.java b/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirPsiCodegenTestGenerated.java index 6804d7bb..b5f8019e 100644 --- a/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirPsiCodegenTestGenerated.java +++ b/kmp-nativecoroutines-compiler/src/test/generated/com/rickclephas/kmp/nativecoroutines/compiler/runners/FirPsiCodegenTestGenerated.java @@ -6,6 +6,7 @@ import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import java.io.File; @@ -50,4 +51,44 @@ public void testProperties() { public void testViewmodelscope() { runTest("src/testData/codegen/viewmodelscope.kt"); } + + @Nested + @TestMetadata("src/testData/codegen/swift1") + @TestDataPath("$PROJECT_ROOT") + public class Swift1 { + @Test + public void testAllFilesPresentInSwift1() { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("src/testData/codegen/swift1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kt$"), TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotations.kt") + public void testAnnotations() { + runTest("src/testData/codegen/swift1/annotations.kt"); + } + + @Test + @TestMetadata("coroutinescope.kt") + public void testCoroutinescope() { + runTest("src/testData/codegen/swift1/coroutinescope.kt"); + } + + @Test + @TestMetadata("functions.kt") + public void testFunctions() { + runTest("src/testData/codegen/swift1/functions.kt"); + } + + @Test + @TestMetadata("properties.kt") + public void testProperties() { + runTest("src/testData/codegen/swift1/properties.kt"); + } + + @Test + @TestMetadata("viewmodelscope.kt") + public void testViewmodelscope() { + runTest("src/testData/codegen/swift1/viewmodelscope.kt"); + } + } } diff --git a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/directives/KmpNativeCoroutinesDirectives.kt b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/directives/KmpNativeCoroutinesDirectives.kt index 35db7405..b73b68b2 100644 --- a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/directives/KmpNativeCoroutinesDirectives.kt +++ b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/directives/KmpNativeCoroutinesDirectives.kt @@ -7,6 +7,7 @@ import com.rickclephas.kmp.nativecoroutines.compiler.config.FLOW_VALUE_SUFFIX as import com.rickclephas.kmp.nativecoroutines.compiler.config.FLOW_REPLAY_CACHE_SUFFIX as FLOW_REPLAY_CACHE_SUFFIX_CONFIG import com.rickclephas.kmp.nativecoroutines.compiler.config.STATE_SUFFIX as STATE_SUFFIX_CONFIG import com.rickclephas.kmp.nativecoroutines.compiler.config.STATE_FLOW_SUFFIX as STATE_FLOW_SUFFIX_CONFIG +import com.rickclephas.kmp.nativecoroutines.compiler.config.SWIFT_EXPORT as SWIFT_EXPORT_CONFIG import org.jetbrains.kotlin.test.directives.model.DirectiveApplicability import org.jetbrains.kotlin.test.directives.model.SimpleDirective import org.jetbrains.kotlin.test.directives.model.SimpleDirectivesContainer @@ -30,4 +31,5 @@ internal object KmpNativeCoroutinesDirectives: SimpleDirectivesContainer() { val FLOW_REPLAY_CACHE_SUFFIX by valueDirective(FLOW_REPLAY_CACHE_SUFFIX_CONFIG) val STATE_SUFFIX by valueDirective(STATE_SUFFIX_CONFIG) val STATE_FLOW_SUFFIX by valueDirective(STATE_FLOW_SUFFIX_CONFIG) + val SWIFT_EXPORT by valueDirective(SWIFT_EXPORT_CONFIG) } diff --git a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt index 81dca411..0624df29 100644 --- a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt +++ b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt @@ -1,5 +1,6 @@ package com.rickclephas.kmp.nativecoroutines.compiler.runners +import com.rickclephas.kmp.nativecoroutines.compiler.config.SWIFT_EXPORT import com.rickclephas.kmp.nativecoroutines.compiler.directives.KmpNativeCoroutinesDirectives import com.rickclephas.kmp.nativecoroutines.compiler.services.KmpNativeCoroutinesCompilerPluginConfigurator import com.rickclephas.kmp.nativecoroutines.compiler.services.KmpNativeCoroutinesJvmRuntimeClasspathProvider @@ -79,6 +80,15 @@ abstract class AbstractFirBaseCodegenTest( KmpNativeCoroutinesDirectives.STATE_SUFFIX with "Value" KmpNativeCoroutinesDirectives.STATE_FLOW_SUFFIX with "Flow" } + listOf( + "1", // Kotlin 2.2.21 + ).forEach { version -> + forTestsMatching("swift$version/*") { + defaultDirectives { + KmpNativeCoroutinesDirectives.SWIFT_EXPORT with SWIFT_EXPORT.parse(version) + } + } + } configureFirParser(firParser) configureFirHandlersStep { useHandlersAtFirst( diff --git a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/services/KmpNativeCoroutinesCompilerPluginConfigurator.kt b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/services/KmpNativeCoroutinesCompilerPluginConfigurator.kt index f719e19f..f40f6eb9 100644 --- a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/services/KmpNativeCoroutinesCompilerPluginConfigurator.kt +++ b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/services/KmpNativeCoroutinesCompilerPluginConfigurator.kt @@ -27,6 +27,7 @@ internal class KmpNativeCoroutinesCompilerPluginConfigurator( register(Directives.FLOW_REPLAY_CACHE_SUFFIX, FLOW_REPLAY_CACHE_SUFFIX.configKey) register(Directives.STATE_SUFFIX, STATE_SUFFIX.configKey) register(Directives.STATE_FLOW_SUFFIX, STATE_FLOW_SUFFIX.configKey) + register(Directives.SWIFT_EXPORT, SWIFT_EXPORT.configKey) } override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule) { diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.ir.txt index bef5cbff..b4eeb1b4 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.ir.txt @@ -96,14 +96,22 @@ FILE fqName: fileName:/annotations.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest BLOCK_BODY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun deprecatedFunction1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun deprecatedFunction1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun deprecatedFunction2Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun deprecatedFunction2Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT @@ -121,18 +129,30 @@ FILE fqName: fileName:/annotations.kt TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun objCNameFunction1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun objCNameFunction1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun objCNameFunction2Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun objCNameFunction2Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun objCNameFunction3Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun objCNameFunction3Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT @@ -151,11 +171,15 @@ FILE fqName: fileName:/annotations.kt TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun objCNameFunctionParameterNative (value: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG value: CONST String type=kotlin.String value="OK13" + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun objCNameFunctionParameterNative (value: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG value: CONST String type=kotlin.String value="OK13" FUN name:deprecatedFunction1 visibility:public modality:FINAL returnType:kotlin.String [suspend] annotations: NativeCoroutines diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.kt.txt index c6d59fd8..8daa9b9c 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.kt.txt @@ -41,20 +41,38 @@ val objCNameProperty2: StateFlow fun box(): String { return runBoxTest(action = local suspend fun BoxTest.() { - $this$runBoxTest.await(nativeSuspend = deprecatedFunction1Native()) - $this$runBoxTest.await(nativeSuspend = deprecatedFunction2Native()) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return deprecatedFunction1Native() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return deprecatedFunction2Native() + } +) $this$runBoxTest.collect(nativeFlow = ()) $this$runBoxTest.collect(nativeFlow = ()) $this$runBoxTest.collect(nativeFlow = (), maxValues = 1) $this$runBoxTest.value(value = ()) - $this$runBoxTest.await(nativeSuspend = objCNameFunction1Native()) - $this$runBoxTest.await(nativeSuspend = objCNameFunction2Native()) - $this$runBoxTest.await(nativeSuspend = objCNameFunction3Native()) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return objCNameFunction1Native() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return objCNameFunction2Native() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return objCNameFunction3Native() + } +) $this$runBoxTest.collect(nativeFlow = (), maxValues = 1) $this$runBoxTest.value(value = ()) $this$runBoxTest.collect(nativeFlow = (), maxValues = 1) $this$runBoxTest.value(value = ()) - $this$runBoxTest.await(nativeSuspend = objCNameFunctionParameterNative(value = "OK13")) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return objCNameFunctionParameterNative(value = "OK13") + } +) } ) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.txt index 27f405e7..7671e9ff 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.fir.txt @@ -35,20 +35,38 @@ FILE: annotations.kt } public final fun box(): R|kotlin/String| { ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/deprecatedFunction1Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/deprecatedFunction2Native|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/deprecatedFunction1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/deprecatedFunction2Native|() + } + ) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/deprecatedProperty1Native|) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/deprecatedProperty2Native|) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/deprecatedProperty4Native|, Int(1)) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/deprecatedProperty4Value|) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/objCNameFunction1Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/objCNameFunction2Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/objCNameFunction3Native|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/objCNameFunction1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/objCNameFunction2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/objCNameFunction3Native|() + } + ) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/objCNameProperty1Native|, Int(1)) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/objCNameProperty1Value|) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/objCNameProperty2Flow|, Int(1)) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/objCNameProperty2Value|) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/objCNameFunctionParameterNative|(String(OK13))) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/objCNameFunctionParameterNative|(String(OK13)) + } + ) } ) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.kt index b30a56ef..87109c23 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.kt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/annotations.kt @@ -68,18 +68,18 @@ val objCNameProperty2: StateFlow = MutableStateFlow("OK12") suspend fun objCNameFunctionParameter(@ObjCName("valueObjC") value: String): String = value fun box() = runBoxTest { - await(deprecatedFunction1Native()) - await(deprecatedFunction2Native()) + await { deprecatedFunction1Native() } + await { deprecatedFunction2Native() } collect(deprecatedProperty1Native) collect(deprecatedProperty2Native) collect(deprecatedProperty4Native, maxValues = 1) value(deprecatedProperty4Value) - await(objCNameFunction1Native()) - await(objCNameFunction2Native()) - await(objCNameFunction3Native()) + await { objCNameFunction1Native() } + await { objCNameFunction2Native() } + await { objCNameFunction3Native() } collect(objCNameProperty1Native, maxValues = 1) value(objCNameProperty1Value) collect(objCNameProperty2Flow, maxValues = 1) value(objCNameProperty2Value) - await(objCNameFunctionParameterNative("OK13")) + await { objCNameFunctionParameterNative("OK13") } } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.ir.txt index 612172ca..029712c2 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.ir.txt @@ -471,29 +471,41 @@ FILE fqName: fileName:/coroutinescope2.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest BLOCK_BODY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT ARG nativeFlow: CALL 'public final fun (): kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=GET_PROPERTY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass1' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass1' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT ARG nativeFlow: CALL 'public final fun (): kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass2' type=kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=GET_PROPERTY ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass2' type=.MyClass2 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnOtherSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass3' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass3' type=.MyClass3 origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnOtherSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass3' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass3' type=.MyClass3 origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT @@ -507,12 +519,16 @@ FILE fqName: fileName:/coroutinescope2.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:.MyClass4 BLOCK_BODY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass4' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG (index:0): GET_VAR '$this$with: .MyClass4 declared in .box..' type=.MyClass4 origin=IMPLICIT_ARGUMENT - ARG (index:1): CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box..' + CALL 'public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass4' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG (index:0): GET_VAR '$this$with: .MyClass4 declared in .box..' type=.MyClass4 origin=IMPLICIT_ARGUMENT + ARG (index:1): CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT @@ -526,27 +542,43 @@ FILE fqName: fileName:/coroutinescope2.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:.MyClass5 BLOCK_BODY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass5' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG (index:0): GET_VAR '$this$with: .MyClass5 declared in .box..' type=.MyClass5 origin=IMPLICIT_ARGUMENT - ARG (index:1): CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box..' + CALL 'public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass5' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG (index:0): GET_VAR '$this$with: .MyClass5 declared in .box..' type=.MyClass5 origin=IMPLICIT_ARGUMENT + ARG (index:1): CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass6' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass6' type=.MyClass6 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass6' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass6' type=.MyClass6 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnExtSuspendValueNative (: .MyClass6): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass6' type=.MyClass6 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnExtSuspendValueNative (: .MyClass6): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass6' type=.MyClass6 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnOtherSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass7' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass7' type=.MyClass7 origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnOtherSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass7' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass7' type=.MyClass7 origin=null FUN name:returnExtSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass6 annotations: diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.kt.txt index e83dea24..828e16cc 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.kt.txt @@ -200,24 +200,48 @@ class MyClass7 : MyClass6 { fun box(): String { return runBoxTest(action = local suspend fun BoxTest.() { - $this$runBoxTest.await(nativeSuspend = returnSuspendValueNative()) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendValueNative() + } +) $this$runBoxTest.collect(nativeFlow = ()) - $this$runBoxTest.await(nativeSuspend = MyClass1().returnSuspendValueNative()) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass1().returnSuspendValueNative() + } +) $this$runBoxTest.collect(nativeFlow = MyClass2().()) - $this$runBoxTest.await(nativeSuspend = MyClass3().returnOtherSuspendValueNative()) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass3().returnOtherSuspendValueNative() + } +) $this$runBoxTest.collect(nativeFlow = (/* = MyClass3() */)) with(receiver = MyClass4(), block = local fun MyClass4.() { - $this$runBoxTest.await(nativeSuspend = $this$with.returnExtSuspendValueNative(/* = MyClass1() */)) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return $this$with.returnExtSuspendValueNative(/* = MyClass1() */) + } +) } ) $this$runBoxTest.collect(nativeFlow = (/* = MyClass3() */)) with(receiver = MyClass5(), block = local fun MyClass5.() { - $this$runBoxTest.await(nativeSuspend = $this$with.returnExtSuspendValueNative(/* = MyClass1() */)) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return $this$with.returnExtSuspendValueNative(/* = MyClass1() */) + } +) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass6().returnSuspendValueNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnExtSuspendValueNative(/* = MyClass6() */) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass7().returnOtherSuspendValueNative() } ) - $this$runBoxTest.await(nativeSuspend = MyClass6().returnSuspendValueNative()) - $this$runBoxTest.await(nativeSuspend = returnExtSuspendValueNative(/* = MyClass6() */)) - $this$runBoxTest.await(nativeSuspend = MyClass7().returnOtherSuspendValueNative()) } ) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.txt index 0d2a3679..ee86bf42 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.fir.txt @@ -134,24 +134,48 @@ FILE: coroutinescope2.kt } public final fun box(): R|kotlin/String| { ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnSuspendValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnSuspendValueNative|() + } + ) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/flowPropertyNative|) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass1.MyClass1|().R|/MyClass1.returnSuspendValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass1.MyClass1|().R|/MyClass1.returnSuspendValueNative|() + } + ) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyClass2.MyClass2|().R|/MyClass2.flowPropertyNative|) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass3.MyClass3|().R|/MyClass3.returnOtherSuspendValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass3.MyClass3|().R|/MyClass3.returnOtherSuspendValueNative|() + } + ) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyClass3.MyClass3|().R|/flowExtProperty1Native|) R|kotlin/with|(R|/MyClass4.MyClass4|(), = with@fun R|MyClass4|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|((this@R|special/anonymous|, R|/MyClass1.MyClass1|()).R|/MyClass4.returnExtSuspendValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ (this@R|special/anonymous|, R|/MyClass1.MyClass1|()).R|/MyClass4.returnExtSuspendValueNative|() + } + ) } ) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyClass3.MyClass3|().R|/flowExtProperty2Native|) R|kotlin/with|(R|/MyClass5.MyClass5|(), = with@fun R|MyClass5|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|((this@R|special/anonymous|, R|/MyClass1.MyClass1|()).R|/MyClass5.returnExtSuspendValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ (this@R|special/anonymous|, R|/MyClass1.MyClass1|()).R|/MyClass5.returnExtSuspendValueNative|() + } + ) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass6.MyClass6|().R|/MyClass6.returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass6.MyClass6|().R|/returnExtSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass7.MyClass7|().R|/MyClass7.returnOtherSuspendValueNative|() } ) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass6.MyClass6|().R|/MyClass6.returnSuspendValueNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass6.MyClass6|().R|/returnExtSuspendValueNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass7.MyClass7|().R|/MyClass7.returnOtherSuspendValueNative|()) } ) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.kt index 7876727c..e1a95efc 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.kt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/coroutinescope.kt @@ -80,20 +80,20 @@ class MyClass7: MyClass6() { } fun box() = runBoxTest { - await(returnSuspendValueNative()) + await { returnSuspendValueNative() } collect(flowPropertyNative) - await(MyClass1().returnSuspendValueNative()) + await { MyClass1().returnSuspendValueNative() } collect(MyClass2().flowPropertyNative) - await(MyClass3().returnOtherSuspendValueNative()) + await { MyClass3().returnOtherSuspendValueNative() } collect(MyClass3().flowExtProperty1Native) with(MyClass4()) { - await(MyClass1().returnExtSuspendValueNative()) + await { MyClass1().returnExtSuspendValueNative() } } collect(MyClass3().flowExtProperty2Native) with(MyClass5()) { - await(MyClass1().returnExtSuspendValueNative()) + await { MyClass1().returnExtSuspendValueNative() } } - await(MyClass6().returnSuspendValueNative()) - await(MyClass6().returnExtSuspendValueNative()) - await(MyClass7().returnOtherSuspendValueNative()) + await { MyClass6().returnSuspendValueNative() } + await { MyClass6().returnExtSuspendValueNative() } + await { MyClass7().returnOtherSuspendValueNative() } } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.ir.txt index 8df19545..0107c50a 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.ir.txt @@ -364,14 +364,22 @@ FILE fqName: fileName:/functions.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest BLOCK_BODY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String? ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnNullableSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnNullableSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT @@ -393,76 +401,128 @@ FILE fqName: fileName:/functions.kt ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT ARG nativeFlow: CALL 'public final fun returnStateFlowValueNative (): kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null ARG maxValues: CONST Int type=kotlin.Int value=1 - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass8' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass8' type=.MyClass8 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass8' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass8' type=.MyClass8 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendParameterValueNative (value: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG value: CONST String type=kotlin.String value="OK9" - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendParameterValueNative (value: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG value: CONST String type=kotlin.String value="OK9" + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.Int ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendParameterValueNative (value: kotlin.Int): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG value: CONST Int type=kotlin.Int value=9 - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendParameterValueNative (value: kotlin.Int): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG value: CONST Int type=kotlin.Int value=9 + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnThrowsSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnThrowsSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendVarargValueNative (vararg values: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG values: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value="OK11" - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendVarargValueNative (vararg values: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG values: VARARG type=kotlin.Array varargElementType=kotlin.String + CONST String type=kotlin.String value="OK11" + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnGenericSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.MyClass14, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass14' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyClass14) declared in .MyClass14' type=.MyClass14 origin=null - TYPE_ARG (of class) T: kotlin.String - ARG value: CONST String type=kotlin.String value="OK12" - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnGenericSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.MyClass14, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass14' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyClass14) declared in .MyClass14' type=.MyClass14 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK12" + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnRefinedSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun awaitAndCollect (nativeSuspendFlow: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnRefinedSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun awaitAndCollect (maxValues: kotlin.Int?, nativeSuspend: kotlin.Function0, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspendFlow: CALL 'public final fun returnSuspendFlowValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendFlowValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnGenericSuspendValueNative (value: T of .returnGenericSuspendValueNative): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.returnGenericSuspendValueNative, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - TYPE_ARG T: kotlin.String - ARG value: CONST String type=kotlin.String value="OK15" - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnGenericSuspendValueNative (value: T of .returnGenericSuspendValueNative): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.returnGenericSuspendValueNative, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK15" + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun functionWithGenericValuesNative (value1: T1 of .MyClass16.functionWithGenericValuesNative, value2: T2 of .MyClass16.functionWithGenericValuesNative): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass16' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - TYPE_ARG T1: kotlin.CharSequence - TYPE_ARG T2: kotlin.String - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass16' type=.MyClass16 origin=null - ARG value1: CONST String type=kotlin.String value="OK" - ARG value2: CONST String type=kotlin.String value="16" - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun functionWithGenericValuesNative (value1: T1 of .MyClass16.functionWithGenericValuesNative, value2: T2 of .MyClass16.functionWithGenericValuesNative): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass16' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + TYPE_ARG T1: kotlin.CharSequence + TYPE_ARG T2: kotlin.String + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass16' type=.MyClass16 origin=null + ARG value1: CONST String type=kotlin.String value="OK" + ARG value2: CONST String type=kotlin.String value="16" + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnInlineSuspendValueNative (value: T of .returnInlineSuspendValueNative): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.returnInlineSuspendValueNative, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - TYPE_ARG T: kotlin.String - ARG value: CONST String type=kotlin.String value="OK17" - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null - TYPE_ARG T: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>? + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnInlineSuspendValueNative (value: T of .returnInlineSuspendValueNative): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.returnInlineSuspendValueNative, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK17" + CALL 'public final fun awaitAndCollectNull (nativeSuspend: kotlin.Function0, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnNullableSuspendFlowNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnNullableSuspendFlowNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnExtensionValueNative (: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONST String type=kotlin.String value="OK19" + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnExtensionValueNative (: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONST String type=kotlin.String value="OK19" CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null TYPE_ARG T: .MyClass20 TYPE_ARG R: kotlin.Unit @@ -471,23 +531,35 @@ FILE fqName: fileName:/functions.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:.MyClass20 BLOCK_BODY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnClassExtensionValueNative (: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass20' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG (index:0): GET_VAR '$this$with: .MyClass20 declared in .box..' type=.MyClass20 origin=IMPLICIT_ARGUMENT - ARG (index:1): CONST String type=kotlin.String value="OK20" - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box..' + CALL 'public final fun returnClassExtensionValueNative (: kotlin.String): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass20' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG (index:0): GET_VAR '$this$with: .MyClass20 declared in .box..' type=.MyClass20 origin=IMPLICIT_ARGUMENT + ARG (index:1): CONST String type=kotlin.String value="OK20" + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String? ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnGenericValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.MyClass21?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass21' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass21' type=.MyClass21 origin=null - TYPE_ARG (of class) T: kotlin.String - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnGenericValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2.MyClass21?, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass21' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass21' type=.MyClass21 origin=null + TYPE_ARG (of class) T: kotlin.String + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public open fun returnInterfaceSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass22' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass22' type=.MyClass22 origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public open fun returnInterfaceSuspendValueNative (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyClass22' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass22' type=.MyClass22 origin=null CALL 'public final fun collect (nativeFlow: kotlin.Function3<@[ParameterName(name = "onItem")] kotlin.Function3, kotlin.Unit, kotlin.Unit>, @[ParameterName(name = "onComplete")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.kt.txt index f207c39d..6a7b5a24 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.kt.txt @@ -164,32 +164,86 @@ interface MyInterface22 { fun box(): String { return runBoxTest(action = local suspend fun BoxTest.() { - $this$runBoxTest.await(nativeSuspend = returnSuspendValueNative()) - $this$runBoxTest.await(nativeSuspend = returnNullableSuspendValueNative()) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendValueNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnNullableSuspendValueNative() + } +) $this$runBoxTest.collect(nativeFlow = returnFlowValueNative()) $this$runBoxTest.collect(nativeFlow = returnNullableFlowValueNative()) $this$runBoxTest.value, Unit, Unit>, @ParameterName(name = "onComplete") Function2, @ParameterName(name = "onCancelled") Function2, Function0>?>(value = returnNullableFlowNative()) $this$runBoxTest.value, Unit, Unit>, @ParameterName(name = "onComplete") Function2, @ParameterName(name = "onCancelled") Function2, Function0>?>(value = returnNullableFlowAndValueNative()) $this$runBoxTest.collect(nativeFlow = returnStateFlowValueNative(), maxValues = 1) - $this$runBoxTest.await(nativeSuspend = MyClass8().returnSuspendValueNative()) - $this$runBoxTest.await(nativeSuspend = returnSuspendParameterValueNative(value = "OK9")) - $this$runBoxTest.await(nativeSuspend = returnSuspendParameterValueNative(value = 9)) - $this$runBoxTest.await(nativeSuspend = returnThrowsSuspendValueNative()) - $this$runBoxTest.await(nativeSuspend = returnSuspendVarargValueNative(values = ["OK11"])) - $this$runBoxTest.await(nativeSuspend = MyClass14(value = "OK12").returnGenericSuspendValueNative()) - $this$runBoxTest.await(nativeSuspend = returnRefinedSuspendValueNative()) - $this$runBoxTest.awaitAndCollect(nativeSuspendFlow = returnSuspendFlowValueNative()) - $this$runBoxTest.await(nativeSuspend = returnGenericSuspendValueNative(value = "OK15")) - $this$runBoxTest.await(nativeSuspend = MyClass16().functionWithGenericValuesNative(value1 = "OK", value2 = "16")) - $this$runBoxTest.await(nativeSuspend = returnInlineSuspendValueNative(value = "OK17")) - $this$runBoxTest.await, Unit, Unit>, @ParameterName(name = "onComplete") Function2, @ParameterName(name = "onCancelled") Function2, Function0>?>(nativeSuspend = returnNullableSuspendFlowNative()) - $this$runBoxTest.await(nativeSuspend = returnExtensionValueNative(/* = "OK19" */)) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass8().returnSuspendValueNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendParameterValueNative(value = "OK9") + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendParameterValueNative(value = 9) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnThrowsSuspendValueNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendVarargValueNative(values = ["OK11"]) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass14(value = "OK12").returnGenericSuspendValueNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnRefinedSuspendValueNative() + } +) + $this$runBoxTest.awaitAndCollect(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, Unit, Unit>, @ParameterName(name = "onComplete") Function2, @ParameterName(name = "onCancelled") Function2, Function0>, Unit, Unit>, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendFlowValueNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnGenericSuspendValueNative(value = "OK15") + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass16().functionWithGenericValuesNative(value1 = "OK", value2 = "16") + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnInlineSuspendValueNative(value = "OK17") + } +) + $this$runBoxTest.awaitAndCollectNull(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, Unit, Unit>, @ParameterName(name = "onComplete") Function2, @ParameterName(name = "onCancelled") Function2, Function0>?, Unit, Unit>, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnNullableSuspendFlowNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnExtensionValueNative(/* = "OK19" */) + } +) with(receiver = MyClass20(), block = local fun MyClass20.() { - $this$runBoxTest.await(nativeSuspend = $this$with.returnClassExtensionValueNative(/* = "OK20" */)) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return $this$with.returnClassExtensionValueNative(/* = "OK20" */) + } +) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass21().returnGenericValueNative() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyClass22().returnInterfaceSuspendValueNative() } ) - $this$runBoxTest.await(nativeSuspend = MyClass21().returnGenericValueNative()) - $this$runBoxTest.await(nativeSuspend = MyClass22().returnInterfaceSuspendValueNative()) $this$runBoxTest.collect(nativeFlow = returnCustomFlowValueNative()) } ) diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.txt index b3232f37..256dc6d1 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.fir.txt @@ -160,32 +160,86 @@ FILE: functions.kt } public final fun box(): R|kotlin/String| { ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnSuspendValueNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnNullableSuspendValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnNullableSuspendValueNative|() + } + ) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnFlowValueNative|()) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnNullableFlowValueNative|()) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?=} (({@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0)?|>(R|/returnNullableFlowNative|()) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?=} (({@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0)?|>(R|/returnNullableFlowAndValueNative|()) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnStateFlowValueNative|(), Int(1)) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass8.MyClass8|().R|/MyClass8.returnSuspendValueNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnSuspendParameterValueNative|(String(OK9))) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnSuspendParameterValueNative|(Int(9))) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnThrowsSuspendValueNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnSuspendVarargValueNative|(vararg(String(OK11)))) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass14.MyClass14|(String(OK12)).R|SubstitutionOverride|>|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnRefinedSuspendValueNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.awaitAndCollect|(R|/returnSuspendFlowValueNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnGenericSuspendValueNative|(String(OK15))) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass16.MyClass16|().R|/MyClass16.functionWithGenericValuesNative|(String(OK), String(16))) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/returnInlineSuspendValueNative|(String(OK17))) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|?=} (({@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0)?|>(R|/returnNullableSuspendFlowNative|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(String(OK19).R|/returnExtensionValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass8.MyClass8|().R|/MyClass8.returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnSuspendParameterValueNative|(String(OK9)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnSuspendParameterValueNative|(Int(9)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnThrowsSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnSuspendVarargValueNative|(vararg(String(OK11))) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass14.MyClass14|(String(OK12)).R|SubstitutionOverride|>|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnRefinedSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.awaitAndCollect|( = awaitAndCollect@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend<{com/rickclephas/kmp/nativecoroutines/NativeFlow=} kotlin/Function3<{@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0>>=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeFlow=} kotlin/Function3<{@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0>>=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeFlow=} kotlin/Function3<{@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0>, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnSuspendFlowValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnGenericSuspendValueNative|(String(OK15)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass16.MyClass16|().R|/MyClass16.functionWithGenericValuesNative|(String(OK), String(16)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnInlineSuspendValueNative|(String(OK17)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.awaitAndCollectNull|( = awaitAndCollectNull@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend<{com/rickclephas/kmp/nativecoroutines/NativeFlow?=} kotlin/Function3<{@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0>?>=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeFlow?=} kotlin/Function3<{@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0>?>=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeFlow?=} kotlin/Function3<{@R|kotlin/ParameterName|(name = String(onItem)) com/rickclephas/kmp/nativecoroutines/NativeCallback2>=} @R|kotlin/ParameterName|(name = String(onItem)) kotlin/Function3, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onComplete)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?>=} @R|kotlin/ParameterName|(name = String(onComplete)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError?=} kotlin/Throwable?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0>?, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/returnNullableSuspendFlowNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ String(OK19).R|/returnExtensionValueNative|() + } + ) R|kotlin/with|(R|/MyClass20.MyClass20|(), = with@fun R|MyClass20|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|((this@R|special/anonymous|, String(OK20)).R|/MyClass20.returnClassExtensionValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ (this@R|special/anonymous|, String(OK20)).R|/MyClass20.returnClassExtensionValueNative|() + } + ) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass21.MyClass21|().R|SubstitutionOverride|>|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyClass22.MyClass22|().R|/MyInterface22.returnInterfaceSuspendValueNative|() } ) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass21.MyClass21|().R|SubstitutionOverride|>|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyClass22.MyClass22|().R|/MyInterface22.returnInterfaceSuspendValueNative|()) this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnCustomFlowValueNative|()) } ) diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.kt index f28f700c..073c7902 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/functions.kt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/functions.kt @@ -102,30 +102,30 @@ class MyFlow23( fun returnCustomFlowValue(): MyFlow23 = MyFlow23(23, "OK23") fun box() = runBoxTest { - await(returnSuspendValueNative()) - await(returnNullableSuspendValueNative()) + await { returnSuspendValueNative() } + await { returnNullableSuspendValueNative() } collect(returnFlowValueNative()) collect(returnNullableFlowValueNative()) value(returnNullableFlowNative()) value(returnNullableFlowAndValueNative()) collect(returnStateFlowValueNative(), maxValues = 1) - await(MyClass8().returnSuspendValueNative()) - await(returnSuspendParameterValueNative("OK9")) - await(returnSuspendParameterValueNative(9)) - await(returnThrowsSuspendValueNative()) - await(returnSuspendVarargValueNative("OK11")) - await(MyClass14("OK12").returnGenericSuspendValueNative()) - await(returnRefinedSuspendValueNative()) - awaitAndCollect(returnSuspendFlowValueNative()) - await(returnGenericSuspendValueNative("OK15")) - await(MyClass16().functionWithGenericValuesNative("OK", "16")) - await(returnInlineSuspendValueNative("OK17")) - await(returnNullableSuspendFlowNative()) - await("OK19".returnExtensionValueNative()) + await { MyClass8().returnSuspendValueNative() } + await { returnSuspendParameterValueNative("OK9") } + await { returnSuspendParameterValueNative(9) } + await { returnThrowsSuspendValueNative() } + await { returnSuspendVarargValueNative("OK11") } + await { MyClass14("OK12").returnGenericSuspendValueNative() } + await { returnRefinedSuspendValueNative() } + awaitAndCollect { returnSuspendFlowValueNative() } + await { returnGenericSuspendValueNative("OK15") } + await { MyClass16().functionWithGenericValuesNative("OK", "16") } + await { returnInlineSuspendValueNative("OK17") } + awaitAndCollectNull { returnNullableSuspendFlowNative() } + await { "OK19".returnExtensionValueNative() } with(MyClass20()) { - await("OK20".returnClassExtensionValueNative()) + await { "OK20".returnClassExtensionValueNative() } } - await(MyClass21().returnGenericValueNative()) - await(MyClass22().returnInterfaceSuspendValueNative()) + await { MyClass21().returnGenericValueNative() } + await { MyClass22().returnInterfaceSuspendValueNative() } collect(returnCustomFlowValueNative()) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.box.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.box.txt new file mode 120000 index 00000000..082c17d0 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.box.txt @@ -0,0 +1 @@ +../annotations.box.txt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt new file mode 100644 index 00000000..c42ad0ad --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt @@ -0,0 +1,410 @@ +FILE fqName: fileName:/annotations.kt + annotations: + Suppress(names = ["OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE"] type=kotlin.Array varargElementType=kotlin.String) + PROPERTY name:deprecatedProperty1 visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + Deprecated(message = "This is deprecated 4", replaceWith = , level = ) + FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty1 type:kotlinx.coroutines.flow.Flow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK4" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY name:deprecatedProperty1 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty1 type:kotlinx.coroutines.flow.Flow visibility:private [final,static]' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY name:deprecatedProperty2 visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + Deprecated(message = "This is deprecated 5", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:WARNING' type=kotlin.DeprecationLevel) + FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty2 type:kotlinx.coroutines.flow.Flow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK5" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY name:deprecatedProperty2 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty2 type:kotlinx.coroutines.flow.Flow visibility:private [final,static]' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY name:deprecatedProperty3 visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + Deprecated(message = "This is deprecated 6", replaceWith = ReplaceWith(expression = "deprecatedProperty2", imports = [] type=kotlin.Array varargElementType=kotlin.String), level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:ERROR' type=kotlin.DeprecationLevel) + FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty3 type:kotlinx.coroutines.flow.Flow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK6" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY name:deprecatedProperty3 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty3 type:kotlinx.coroutines.flow.Flow visibility:private [final,static]' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY name:deprecatedProperty4 visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty4 type:kotlinx.coroutines.flow.MutableStateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK7" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow + annotations: + Deprecated(message = "This is deprecated 7", replaceWith = , level = ) + correspondingProperty: PROPERTY name:deprecatedProperty4 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty4 type:kotlinx.coroutines.flow.MutableStateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + PROPERTY name:objCNameProperty1 visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalObjCName modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass] type=kotlin.Array> varargElementType=kotlin.reflect.KClass) + ObjCName(name = "objCNameProperty1ObjC", swiftName = , exact = ) + FIELD PROPERTY_BACKING_FIELD name:objCNameProperty1 type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK11" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY name:objCNameProperty1 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:objCNameProperty1 type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY name:objCNameProperty2 visibility:public modality:FINAL [val] + annotations: + NativeCoroutinesState + OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalObjCName modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass] type=kotlin.Array> varargElementType=kotlin.reflect.KClass) + ObjCName(name = "objCNameProperty2ObjC", swiftName = , exact = ) + FIELD PROPERTY_BACKING_FIELD name:objCNameProperty2 type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK12" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY name:objCNameProperty2 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:objCNameProperty2 type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.StateFlow origin=null + FUN name:box visibility:public modality:FINAL returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CALL 'public final fun runBoxTest (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.String declared in com.rickclephas.kmp.nativecoroutines' type=kotlin.String origin=null + ARG action: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest + BLOCK_BODY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun deprecatedFunction1Native (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun deprecatedFunction2Native (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun objCNameFunction1Native (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun objCNameFunction2Native (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun objCNameFunction3Native (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun objCNameFunctionParameterNative (value: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG value: CONST String type=kotlin.String value="OK13" + FUN name:deprecatedFunction1 visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + Deprecated(message = "This is deprecated 1", replaceWith = , level = ) + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun deprecatedFunction1 (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK1" + FUN name:deprecatedFunction2 visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + Deprecated(message = "This is deprecated 2", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:WARNING' type=kotlin.DeprecationLevel) + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun deprecatedFunction2 (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK2" + FUN name:deprecatedFunction3 visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + Deprecated(message = "This is deprecated 3", replaceWith = ReplaceWith(expression = "deprecatedFunction2()", imports = [] type=kotlin.Array varargElementType=kotlin.String), level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:ERROR' type=kotlin.DeprecationLevel) + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun deprecatedFunction3 (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK3" + FUN name:objCNameFunction1 visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalObjCName modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass] type=kotlin.Array> varargElementType=kotlin.reflect.KClass) + ObjCName(name = "objCNameFunction1ObjC", swiftName = , exact = ) + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun objCNameFunction1 (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK8" + FUN name:objCNameFunction2 visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalObjCName modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass] type=kotlin.Array> varargElementType=kotlin.reflect.KClass) + ObjCName(name = , swiftName = "objCNameFunction2Swift", exact = ) + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun objCNameFunction2 (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK9" + FUN name:objCNameFunction3 visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalObjCName modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass] type=kotlin.Array> varargElementType=kotlin.reflect.KClass) + ObjCName(name = "objCNameFunction3ObjC", swiftName = "objCNameFunction3Swift", exact = ) + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun objCNameFunction3 (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK10" + FUN name:objCNameFunctionParameter visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:Regular name:value index:0 type:kotlin.String + annotations: + ObjCName(name = "valueObjC", swiftName = , exact = ) + annotations: + NativeCoroutines + OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalObjCName modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass] type=kotlin.Array> varargElementType=kotlin.reflect.KClass) + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun objCNameFunctionParameter (value: kotlin.String): kotlin.String declared in ' + GET_VAR 'value: kotlin.String declared in .objCNameFunctionParameter' type=kotlin.String origin=null +FILE fqName: fileName:__GENERATED DECLARATIONS__.kt + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty4Value visibility:public modality:FINAL [var] + FIELD PROPERTY_BACKING_FIELD name:deprecatedProperty4Value type:kotlin.String visibility:private [static] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + annotations: + Deprecated(message = "This is deprecated 7", replaceWith = , level = ) + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty4Value visibility:public modality:FINAL [var] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.flow.MutableStateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_0: kotlinx.coroutines.flow.MutableStateFlow declared in .' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.String + annotations: + Deprecated(message = "This is deprecated 7", replaceWith = , level = ) + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty4Value visibility:public modality:FINAL [var] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (value: kotlin.String): kotlin.Unit declared in ' + CALL 'public abstract fun (: T of kotlinx.coroutines.flow.MutableStateFlow): kotlin.Unit declared in kotlinx.coroutines.flow.MutableStateFlow' type=kotlin.Unit origin=null + ARG : CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + ARG : GET_VAR 'value: kotlin.String declared in .' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedFunction1Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + Deprecated(message = "This is deprecated 1", replaceWith = , level = ) + ObjCName(name = "deprecatedFunction1", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun deprecatedFunction1Native (): kotlin.String declared in ' + CALL 'public final fun deprecatedFunction1 (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedFunction2Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + Deprecated(message = "This is deprecated 2", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:WARNING' type=kotlin.DeprecationLevel) + ObjCName(name = "deprecatedFunction2", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun deprecatedFunction2Native (): kotlin.String declared in ' + CALL 'public final fun deprecatedFunction2 (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedFunction3Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + Deprecated(message = "This is deprecated 3", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:ERROR' type=kotlin.DeprecationLevel) + ObjCName(name = "deprecatedFunction3", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun deprecatedFunction3Native (): kotlin.String declared in ' + CALL 'public final fun deprecatedFunction3 (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameFunction1Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + ObjCName(name = "objCNameFunction1ObjC", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun objCNameFunction1Native (): kotlin.String declared in ' + CALL 'public final fun objCNameFunction1 (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameFunction2Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + ObjCName(name = "objCNameFunction2", swiftName = "objCNameFunction2Swift", exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun objCNameFunction2Native (): kotlin.String declared in ' + CALL 'public final fun objCNameFunction2 (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameFunction3Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + ObjCName(name = "objCNameFunction3ObjC", swiftName = "objCNameFunction3Swift", exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun objCNameFunction3Native (): kotlin.String declared in ' + CALL 'public final fun objCNameFunction3 (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameFunctionParameterNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.String + annotations: + ObjCName(name = "valueObjC", swiftName = , exact = ) + annotations: + ObjCName(name = "objCNameFunctionParameter", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun objCNameFunctionParameterNative (value: kotlin.String): kotlin.String declared in ' + CALL 'public final fun objCNameFunctionParameter (value: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG value: GET_VAR 'value: kotlin.String declared in .objCNameFunctionParameterNative' type=kotlin.String origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty1Native visibility:public modality:FINAL [val] + annotations: + Deprecated(message = "This is deprecated 4", replaceWith = , level = ) + ObjCName(name = "deprecatedProperty1", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty1Native visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty2Native visibility:public modality:FINAL [val] + annotations: + Deprecated(message = "This is deprecated 5", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:WARNING' type=kotlin.DeprecationLevel) + ObjCName(name = "deprecatedProperty2", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty2Native visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty3Native visibility:public modality:FINAL [val] + annotations: + Deprecated(message = "This is deprecated 6", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:ERROR' type=kotlin.DeprecationLevel) + ObjCName(name = "deprecatedProperty3", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty3Native visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty4Native visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "deprecatedProperty4", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow + annotations: + Deprecated(message = "This is deprecated 7", replaceWith = , level = ) + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:deprecatedProperty4Native visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty1Native visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "objCNameProperty1ObjC", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty1Native visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty1Value visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "objCNameProperty1ObjCValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty1Value visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlinx.coroutines.flow.StateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_13: kotlinx.coroutines.flow.StateFlow declared in .' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty2Flow visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "objCNameProperty2ObjCFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty2Flow visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty2Value visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "objCNameProperty2ObjC", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameProperty2Value visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:kotlinx.coroutines.flow.StateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_15: kotlinx.coroutines.flow.StateFlow declared in .' type=kotlinx.coroutines.flow.StateFlow origin=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt new file mode 100644 index 00000000..e4f211c7 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt @@ -0,0 +1,241 @@ +// FILE: annotations.kt +@file:Suppress(names = ["OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE"]) + +@NativeCoroutines +@Deprecated(message = "This is deprecated 4") +val deprecatedProperty1: Flow + field = flowOf(value = "OK4") + get + +@NativeCoroutines +@Deprecated(message = "This is deprecated 5", level = DeprecationLevel.WARNING) +val deprecatedProperty2: Flow + field = flowOf(value = "OK5") + get + +@NativeCoroutines +@Deprecated(message = "This is deprecated 6", replaceWith = ReplaceWith(expression = "deprecatedProperty2", imports = []), level = DeprecationLevel.ERROR) +val deprecatedProperty3: Flow + field = flowOf(value = "OK6") + get + +@NativeCoroutines +val deprecatedProperty4: MutableStateFlow + field = MutableStateFlow(value = "OK7") + @Deprecated(message = "This is deprecated 7") + get + +@NativeCoroutines +@OptIn(markerClass = [ExperimentalObjCName::class]) +@ObjCName(name = "objCNameProperty1ObjC") +val objCNameProperty1: StateFlow + field = MutableStateFlow(value = "OK11") + get + +@NativeCoroutinesState +@OptIn(markerClass = [ExperimentalObjCName::class]) +@ObjCName(name = "objCNameProperty2ObjC") +val objCNameProperty2: StateFlow + field = MutableStateFlow(value = "OK12") + get + +fun box(): String { + return runBoxTest(action = local suspend fun BoxTest.() { + $this$runBoxTest.await(result = local suspend fun (): String { + return deprecatedFunction1Native() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return deprecatedFunction2Native() + } +) + $this$runBoxTest.collect(flow = ()) + $this$runBoxTest.collect(flow = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.await(result = local suspend fun (): String { + return objCNameFunction1Native() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return objCNameFunction2Native() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return objCNameFunction3Native() + } +) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.await(result = local suspend fun (): String { + return objCNameFunctionParameterNative(value = "OK13") + } +) + } +) +} + +@NativeCoroutines +@Deprecated(message = "This is deprecated 1") +suspend fun deprecatedFunction1(): String { + return "OK1" +} + +@NativeCoroutines +@Deprecated(message = "This is deprecated 2", level = DeprecationLevel.WARNING) +suspend fun deprecatedFunction2(): String { + return "OK2" +} + +@NativeCoroutines +@Deprecated(message = "This is deprecated 3", replaceWith = ReplaceWith(expression = "deprecatedFunction2()", imports = []), level = DeprecationLevel.ERROR) +suspend fun deprecatedFunction3(): String { + return "OK3" +} + +@NativeCoroutines +@OptIn(markerClass = [ExperimentalObjCName::class]) +@ObjCName(name = "objCNameFunction1ObjC") +suspend fun objCNameFunction1(): String { + return "OK8" +} + +@NativeCoroutines +@OptIn(markerClass = [ExperimentalObjCName::class]) +@ObjCName(swiftName = "objCNameFunction2Swift") +suspend fun objCNameFunction2(): String { + return "OK9" +} + +@NativeCoroutines +@OptIn(markerClass = [ExperimentalObjCName::class]) +@ObjCName(name = "objCNameFunction3ObjC", swiftName = "objCNameFunction3Swift") +suspend fun objCNameFunction3(): String { + return "OK10" +} + +@NativeCoroutines +@OptIn(markerClass = [ExperimentalObjCName::class]) +suspend fun objCNameFunctionParameter(@ObjCName(name = "valueObjC") value: String): String { + return value +} + +// FILE: __GENERATED DECLARATIONS__.kt + +var deprecatedProperty4Value: String + @Deprecated(message = "This is deprecated 7") + get(): String { + val tmp_0: MutableStateFlow = () + return tmp_0.() + } + @Deprecated(message = "This is deprecated 7") + set(value: String) { + return ().( = value) + } + +@Deprecated(message = "This is deprecated 1") +@ObjCName(name = "deprecatedFunction1") +suspend fun deprecatedFunction1Native(): String { + val tmp_1: CoroutineScope? = null + return deprecatedFunction1() +} + +@Deprecated(message = "This is deprecated 2", level = DeprecationLevel.WARNING) +@ObjCName(name = "deprecatedFunction2") +suspend fun deprecatedFunction2Native(): String { + val tmp_2: CoroutineScope? = null + return deprecatedFunction2() +} + +@Deprecated(message = "This is deprecated 3", level = DeprecationLevel.ERROR) +@ObjCName(name = "deprecatedFunction3") +suspend fun deprecatedFunction3Native(): String { + val tmp_3: CoroutineScope? = null + return deprecatedFunction3() +} + +@ObjCName(name = "objCNameFunction1ObjC") +suspend fun objCNameFunction1Native(): String { + val tmp_4: CoroutineScope? = null + return objCNameFunction1() +} + +@ObjCName(name = "objCNameFunction2", swiftName = "objCNameFunction2Swift") +suspend fun objCNameFunction2Native(): String { + val tmp_5: CoroutineScope? = null + return objCNameFunction2() +} + +@ObjCName(name = "objCNameFunction3ObjC", swiftName = "objCNameFunction3Swift") +suspend fun objCNameFunction3Native(): String { + val tmp_6: CoroutineScope? = null + return objCNameFunction3() +} + +@ObjCName(name = "objCNameFunctionParameter") +suspend fun objCNameFunctionParameterNative(@ObjCName(name = "valueObjC") value: String): String { + val tmp_7: CoroutineScope? = null + return objCNameFunctionParameter(value = value) +} + +@Deprecated(message = "This is deprecated 4") +@ObjCName(name = "deprecatedProperty1") +val deprecatedProperty1Native: Flow + get(): Flow { + val tmp_8: CoroutineScope? = null + return () + } + +@Deprecated(message = "This is deprecated 5", level = DeprecationLevel.WARNING) +@ObjCName(name = "deprecatedProperty2") +val deprecatedProperty2Native: Flow + get(): Flow { + val tmp_9: CoroutineScope? = null + return () + } + +@Deprecated(message = "This is deprecated 6", level = DeprecationLevel.ERROR) +@ObjCName(name = "deprecatedProperty3") +val deprecatedProperty3Native: Flow + get(): Flow { + val tmp_10: CoroutineScope? = null + return () + } + +@ObjCName(name = "deprecatedProperty4") +val deprecatedProperty4Native: MutableStateFlow + @Deprecated(message = "This is deprecated 7") + get(): MutableStateFlow { + val tmp_11: CoroutineScope? = null + return () + } + +@ObjCName(name = "objCNameProperty1ObjC") +val objCNameProperty1Native: StateFlow + get(): StateFlow { + val tmp_12: CoroutineScope? = null + return () + } + +@ObjCName(name = "objCNameProperty1ObjCValue") +val objCNameProperty1Value: String + get(): String { + val tmp_13: StateFlow = () + return tmp_13.() + } + +@ObjCName(name = "objCNameProperty2ObjCFlow") +val objCNameProperty2Flow: StateFlow + get(): StateFlow { + val tmp_14: CoroutineScope? = null + return () + } + +@ObjCName(name = "objCNameProperty2ObjC") +val objCNameProperty2Value: String + get(): String { + val tmp_15: StateFlow = () + return tmp_15.() + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt new file mode 100644 index 00000000..70de248b --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt @@ -0,0 +1,147 @@ +FILE: annotations.kt + @FILE:R|kotlin/Suppress|(names = vararg(String(OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE))) + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/Deprecated|(message = String(This is deprecated 1)) public final suspend fun deprecatedFunction1(): R|kotlin/String| { + ^deprecatedFunction1 String(OK1) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/Deprecated|(message = String(This is deprecated 2), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.WARNING|) public final suspend fun deprecatedFunction2(): R|kotlin/String| { + ^deprecatedFunction2 String(OK2) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/Deprecated|(message = String(This is deprecated 3), replaceWith = R|kotlin/ReplaceWith.ReplaceWith|(String(deprecatedFunction2())), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.ERROR|) public final suspend fun deprecatedFunction3(): R|kotlin/String| { + ^deprecatedFunction3 String(OK3) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/Deprecated|(message = String(This is deprecated 4)) public final val deprecatedProperty1: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK4)) + public get(): R|kotlinx/coroutines/flow/Flow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/Deprecated|(message = String(This is deprecated 5), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.WARNING|) public final val deprecatedProperty2: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK5)) + public get(): R|kotlinx/coroutines/flow/Flow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/Deprecated|(message = String(This is deprecated 6), replaceWith = R|kotlin/ReplaceWith.ReplaceWith|(String(deprecatedProperty2)), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.ERROR|) public final val deprecatedProperty3: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK6)) + public get(): R|kotlinx/coroutines/flow/Flow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val deprecatedProperty4: R|kotlinx/coroutines/flow/MutableStateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK7)) + @PROPERTY_GETTER:R|kotlin/Deprecated|(message = String(This is deprecated 7)) public get(): R|kotlinx/coroutines/flow/MutableStateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/OptIn|(markerClass = vararg((Q|kotlin/experimental/ExperimentalObjCName|))) @R|kotlin/native/ObjCName|(name = String(objCNameFunction1ObjC)) public final suspend fun objCNameFunction1(): R|kotlin/String| { + ^objCNameFunction1 String(OK8) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/OptIn|(markerClass = vararg((Q|kotlin/experimental/ExperimentalObjCName|))) @R|kotlin/native/ObjCName|(swiftName = String(objCNameFunction2Swift)) public final suspend fun objCNameFunction2(): R|kotlin/String| { + ^objCNameFunction2 String(OK9) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/OptIn|(markerClass = vararg((Q|kotlin/experimental/ExperimentalObjCName|))) @R|kotlin/native/ObjCName|(name = String(objCNameFunction3ObjC), swiftName = String(objCNameFunction3Swift)) public final suspend fun objCNameFunction3(): R|kotlin/String| { + ^objCNameFunction3 String(OK10) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/OptIn|(markerClass = vararg((Q|kotlin/experimental/ExperimentalObjCName|))) @R|kotlin/native/ObjCName|(name = String(objCNameProperty1ObjC)) public final val objCNameProperty1: R|kotlinx/coroutines/flow/StateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK11)) + public get(): R|kotlinx/coroutines/flow/StateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesState|() @R|kotlin/OptIn|(markerClass = vararg((Q|kotlin/experimental/ExperimentalObjCName|))) @R|kotlin/native/ObjCName|(name = String(objCNameProperty2ObjC)) public final val objCNameProperty2: R|kotlinx/coroutines/flow/StateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK12)) + public get(): R|kotlinx/coroutines/flow/StateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() @R|kotlin/OptIn|(markerClass = vararg((Q|kotlin/experimental/ExperimentalObjCName|))) public final suspend fun objCNameFunctionParameter(@R|kotlin/native/ObjCName|(name = String(valueObjC)) value: R|kotlin/String|): R|kotlin/String| { + ^objCNameFunctionParameter R|/value| + } + public final fun box(): R|kotlin/String| { + ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/deprecatedFunction1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/deprecatedFunction2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/deprecatedProperty1Native|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/deprecatedProperty2Native|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/deprecatedProperty4Native|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/deprecatedProperty4Value|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/objCNameFunction1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/objCNameFunction2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/objCNameFunction3Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/objCNameProperty1Native|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/objCNameProperty1Value|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/objCNameProperty2Flow|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/objCNameProperty2Value|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/objCNameFunctionParameterNative|(String(OK13)) + } + ) + } + ) + } +FILE: __GENERATED DECLARATIONS__.kt + @R|kotlin/Deprecated|(message = String(This is deprecated 1)) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction1)) public final suspend fun deprecatedFunction1Native(): R|kotlin/String| { + ::R|/deprecatedFunction1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/Deprecated|(message = String(This is deprecated 2), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.WARNING|) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction2)) public final suspend fun deprecatedFunction2Native(): R|kotlin/String| { + ::R|/deprecatedFunction2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/Deprecated|(message = String(This is deprecated 3), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.ERROR|) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction3)) public final suspend fun deprecatedFunction3Native(): R|kotlin/String| { + ::R|/deprecatedFunction3| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/Deprecated|(message = String(This is deprecated 4)) @R|kotlin/native/ObjCName|(name = String(deprecatedProperty1)) public final val deprecatedProperty1Native: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/deprecatedProperty1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/Deprecated|(message = String(This is deprecated 5), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.WARNING|) @R|kotlin/native/ObjCName|(name = String(deprecatedProperty2)) public final val deprecatedProperty2Native: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/deprecatedProperty2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/Deprecated|(message = String(This is deprecated 6), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.ERROR|) @R|kotlin/native/ObjCName|(name = String(deprecatedProperty3)) public final val deprecatedProperty3Native: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/deprecatedProperty3| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(deprecatedProperty4)) public final val deprecatedProperty4Native: R|kotlinx/coroutines/flow/MutableStateFlow| + @R|kotlin/Deprecated|(message = String(This is deprecated 7)) public get(): R|kotlinx/coroutines/flow/MutableStateFlow| { + ::R|/deprecatedProperty4| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final var deprecatedProperty4Value: R|kotlin/String| + @R|kotlin/Deprecated|(message = String(This is deprecated 7)) public get(): R|kotlin/String| { + ::R|/deprecatedProperty4| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/Deprecated|(message = String(This is deprecated 7)) public set(value: R|kotlin/String|): R|kotlin/Unit| + @R|kotlin/native/ObjCName|(name = String(objCNameFunction1ObjC)) public final suspend fun objCNameFunction1Native(): R|kotlin/String| { + ::R|/objCNameFunction1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(objCNameFunction2), swiftName = String(objCNameFunction2Swift)) public final suspend fun objCNameFunction2Native(): R|kotlin/String| { + ::R|/objCNameFunction2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(objCNameFunction3ObjC), swiftName = String(objCNameFunction3Swift)) public final suspend fun objCNameFunction3Native(): R|kotlin/String| { + ::R|/objCNameFunction3| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(objCNameProperty1ObjC)) public final val objCNameProperty1Native: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/objCNameProperty1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(objCNameProperty1ObjCValue)) public final val objCNameProperty1Value: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/objCNameProperty1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(objCNameFunctionParameter)) public final suspend fun objCNameFunctionParameterNative(@R|kotlin/native/ObjCName|(name = String(valueObjC)) value: R|kotlin/String|): R|kotlin/String| { + ::R|/objCNameFunctionParameter| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(objCNameProperty2ObjC)) public final val objCNameProperty2Value: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/objCNameProperty2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(objCNameProperty2ObjCFlow)) public final val objCNameProperty2Flow: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/objCNameProperty2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.kt new file mode 120000 index 00000000..2711d4c5 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.kt @@ -0,0 +1 @@ +../annotations.kt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.box.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.box.txt new file mode 120000 index 00000000..4368a91b --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.box.txt @@ -0,0 +1 @@ +../coroutinescope.box.txt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt new file mode 100644 index 00000000..34bf4998 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt @@ -0,0 +1,606 @@ +FILE fqName: fileName:/coroutinescope1.kt + PROPERTY name:coroutineScope1 visibility:internal modality:FINAL [val] + annotations: + NativeCoroutineScope + FIELD PROPERTY_BACKING_FIELD name:coroutineScope1 type:kotlinx.coroutines.CoroutineScope visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:internal modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + correspondingProperty: PROPERTY name:coroutineScope1 visibility:internal modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:coroutineScope1 type:kotlinx.coroutines.CoroutineScope visibility:private [final,static]' type=kotlinx.coroutines.CoroutineScope origin=null + PROPERTY name:flowProperty visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:flowProperty type:kotlinx.coroutines.flow.Flow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK2" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY name:flowProperty visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:flowProperty type:kotlinx.coroutines.flow.Flow visibility:private [final,static]' type=kotlinx.coroutines.flow.Flow origin=null + CLASS CLASS name:MyClass1 modality:OPEN visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass1 + PROPERTY name:coroutineScope2 visibility:protected modality:FINAL [val] + annotations: + NativeCoroutineScope + FIELD PROPERTY_BACKING_FIELD name:coroutineScope2 type:kotlinx.coroutines.CoroutineScope visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:protected modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + correspondingProperty: PROPERTY name:coroutineScope2 visibility:protected modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='protected final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass1' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:coroutineScope2 type:kotlinx.coroutines.CoroutineScope visibility:private [final]' type=kotlinx.coroutines.CoroutineScope origin=null + receiver: GET_VAR ': .MyClass1 declared in .MyClass1.' type=.MyClass1 origin=null + CONSTRUCTOR visibility:public returnType:.MyClass1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass1 modality:OPEN visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'protected final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass1' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyClass1 declared in .MyClass1.returnSuspendValueNative' type=.MyClass1 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass1' + CALL 'public final fun returnSuspendValue (): kotlin.String declared in .MyClass1' type=kotlin.String origin=null + ARG : GET_VAR ': .MyClass1 declared in .MyClass1.returnSuspendValueNative' type=.MyClass1 origin=null + FUN name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue (): kotlin.String declared in .MyClass1' + CONST String type=kotlin.String value="OK3" + CLASS CLASS name:MyClass2 modality:FINAL visibility:public superTypes:[.MyClass1] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass2 + PROPERTY name:flowProperty visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:flowProperty type:kotlinx.coroutines.flow.Flow visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK4" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass2 + correspondingProperty: PROPERTY name:flowProperty visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in .MyClass2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:flowProperty type:kotlinx.coroutines.flow.Flow visibility:private [final]' type=kotlinx.coroutines.flow.Flow origin=null + receiver: GET_VAR ': .MyClass2 declared in .MyClass2.' type=.MyClass2 origin=null + CONSTRUCTOR visibility:public returnType:.MyClass2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass2 modality:FINAL visibility:public superTypes:[.MyClass1]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyClass1 + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in .MyClass1 + FUN FAKE_OVERRIDE name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend,fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + annotations: + NativeCoroutines + overridden: + public final fun returnSuspendValue (): kotlin.String declared in .MyClass1 + FUN FAKE_OVERRIDE name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend,fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + overridden: + public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass1 + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in .MyClass1 + PROPERTY FAKE_OVERRIDE name:coroutineScope2 visibility:protected modality:FINAL [fake_override,val] + annotations: + NativeCoroutineScope + overridden: + protected final coroutineScope2: kotlinx.coroutines.CoroutineScope declared in .MyClass1 + FUN FAKE_OVERRIDE name: visibility:protected modality:FINAL returnType:kotlinx.coroutines.CoroutineScope [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + correspondingProperty: PROPERTY FAKE_OVERRIDE name:coroutineScope2 visibility:protected modality:FINAL [fake_override,val] + overridden: + protected final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass1 + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowPropertyNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "flowProperty", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass2 + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowPropertyNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'protected final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass2' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyClass2 declared in .MyClass2.' type=.MyClass2 origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in .MyClass2' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in .MyClass2' type=kotlinx.coroutines.flow.Flow origin=null + ARG : GET_VAR ': .MyClass2 declared in .MyClass2.' type=.MyClass2 origin=null + CLASS CLASS name:MyClass3 modality:FINAL visibility:public superTypes:[.MyClass1] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass3 + PROPERTY name:coroutineScope3 visibility:internal modality:FINAL [val] + annotations: + NativeCoroutineScope + FIELD PROPERTY_BACKING_FIELD name:coroutineScope3 type:kotlinx.coroutines.CoroutineScope visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:internal modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass3 + correspondingProperty: PROPERTY name:coroutineScope3 visibility:internal modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass3' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:coroutineScope3 type:kotlinx.coroutines.CoroutineScope visibility:private [final]' type=kotlinx.coroutines.CoroutineScope origin=null + receiver: GET_VAR ': .MyClass3 declared in .MyClass3.' type=.MyClass3 origin=null + CONSTRUCTOR visibility:public returnType:.MyClass3 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass3 modality:FINAL visibility:public superTypes:[.MyClass1]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyClass1 + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in .MyClass1 + FUN FAKE_OVERRIDE name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend,fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + annotations: + NativeCoroutines + overridden: + public final fun returnSuspendValue (): kotlin.String declared in .MyClass1 + FUN FAKE_OVERRIDE name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend,fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + overridden: + public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass1 + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in .MyClass1 + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnOtherSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass3 + annotations: + ObjCName(name = "returnOtherSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass3' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyClass3 declared in .MyClass3.returnOtherSuspendValueNative' type=.MyClass3 origin=null + RETURN type=kotlin.Nothing from='public final fun returnOtherSuspendValueNative (): kotlin.String declared in .MyClass3' + CALL 'public final fun returnOtherSuspendValue (): kotlin.String declared in .MyClass3' type=kotlin.String origin=null + ARG : GET_VAR ': .MyClass3 declared in .MyClass3.returnOtherSuspendValueNative' type=.MyClass3 origin=null + FUN name:returnOtherSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass3 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnOtherSuspendValue (): kotlin.String declared in .MyClass3' + CONST String type=kotlin.String value="OK5" + PROPERTY FAKE_OVERRIDE name:coroutineScope2 visibility:protected modality:FINAL [fake_override,val] + annotations: + NativeCoroutineScope + overridden: + protected final coroutineScope2: kotlinx.coroutines.CoroutineScope declared in .MyClass1 + FUN FAKE_OVERRIDE name: visibility:protected modality:FINAL returnType:kotlinx.coroutines.CoroutineScope [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 + correspondingProperty: PROPERTY FAKE_OVERRIDE name:coroutineScope2 visibility:protected modality:FINAL [fake_override,val] + overridden: + protected final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass1 + CLASS CLASS name:MyClass4 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass4 + CONSTRUCTOR visibility:public returnType:.MyClass4 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass4 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnExtSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass4 + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:.MyClass1 + annotations: + ObjCName(name = "returnExtSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' type=kotlinx.coroutines.CoroutineScope origin=null + RETURN type=kotlin.Nothing from='public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.String declared in .MyClass4' + CALL 'public final fun returnExtSuspendValue (: .MyClass1): kotlin.String declared in .MyClass4' type=kotlin.String origin=null + ARG (index:0): GET_VAR '(index:0): .MyClass4 declared in .MyClass4.returnExtSuspendValueNative' type=.MyClass4 origin=null + ARG (index:1): GET_VAR '(index:1): .MyClass1 declared in .MyClass4.returnExtSuspendValueNative' type=.MyClass1 origin=null + FUN name:returnExtSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass4 + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:.MyClass1 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnExtSuspendValue (: .MyClass1): kotlin.String declared in .MyClass4' + CONST String type=kotlin.String value="OK7" + FUN name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK1" + PROPERTY name:flowExtProperty1 visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass3 + correspondingProperty: PROPERTY name:flowExtProperty1 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK6" +FILE fqName: fileName:/coroutinescope2.kt + CLASS CLASS name:MyClass5 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass5 + CONSTRUCTOR visibility:public returnType:.MyClass5 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass5 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnExtSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass5 + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:.MyClass1 + annotations: + ObjCName(name = "returnExtSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.String declared in .MyClass5' + CALL 'public final fun returnExtSuspendValue (: .MyClass1): kotlin.String declared in .MyClass5' type=kotlin.String origin=null + ARG (index:0): GET_VAR '(index:0): .MyClass5 declared in .MyClass5.returnExtSuspendValueNative' type=.MyClass5 origin=null + ARG (index:1): GET_VAR '(index:1): .MyClass1 declared in .MyClass5.returnExtSuspendValueNative' type=.MyClass1 origin=null + FUN name:returnExtSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass5 + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:.MyClass1 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnExtSuspendValue (: .MyClass1): kotlin.String declared in .MyClass5' + CONST String type=kotlin.String value="OK9" + CLASS CLASS name:MyClass6 modality:OPEN visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass6 + PROPERTY name:coroutineScope4 visibility:private modality:FINAL [val] + annotations: + NativeCoroutineScope + FIELD PROPERTY_BACKING_FIELD name:coroutineScope4 type:kotlinx.coroutines.CoroutineScope visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass6 + correspondingProperty: PROPERTY name:coroutineScope4 visibility:private modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass6' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:coroutineScope4 type:kotlinx.coroutines.CoroutineScope visibility:private [final]' type=kotlinx.coroutines.CoroutineScope origin=null + receiver: GET_VAR ': .MyClass6 declared in .MyClass6.' type=.MyClass6 origin=null + CONSTRUCTOR visibility:public returnType:.MyClass6 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass6 modality:OPEN visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass6 + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'private final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass6' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyClass6 declared in .MyClass6.returnSuspendValueNative' type=.MyClass6 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass6' + CALL 'public final fun returnSuspendValue (): kotlin.String declared in .MyClass6' type=kotlin.String origin=null + ARG : GET_VAR ': .MyClass6 declared in .MyClass6.returnSuspendValueNative' type=.MyClass6 origin=null + FUN name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass6 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue (): kotlin.String declared in .MyClass6' + CONST String type=kotlin.String value="OK10" + CLASS CLASS name:MyClass7 modality:FINAL visibility:public superTypes:[.MyClass6] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass7 + CONSTRUCTOR visibility:public returnType:.MyClass7 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .MyClass6' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass7 modality:FINAL visibility:public superTypes:[.MyClass6]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyClass6 + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in .MyClass6 + FUN FAKE_OVERRIDE name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend,fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass6 + annotations: + NativeCoroutines + overridden: + public final fun returnSuspendValue (): kotlin.String declared in .MyClass6 + FUN FAKE_OVERRIDE name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend,fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass6 + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + overridden: + public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass6 + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in .MyClass6 + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnOtherSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass7 + annotations: + ObjCName(name = "returnOtherSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnOtherSuspendValueNative (): kotlin.String declared in .MyClass7' + CALL 'public final fun returnOtherSuspendValue (): kotlin.String declared in .MyClass7' type=kotlin.String origin=null + ARG : GET_VAR ': .MyClass7 declared in .MyClass7.returnOtherSuspendValueNative' type=.MyClass7 origin=null + FUN name:returnOtherSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass7 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnOtherSuspendValue (): kotlin.String declared in .MyClass7' + CONST String type=kotlin.String value="OK12" + FUN name:box visibility:public modality:FINAL returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CALL 'public final fun runBoxTest (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.String declared in com.rickclephas.kmp.nativecoroutines' type=kotlin.String origin=null + ARG action: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest + BLOCK_BODY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass1' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in .MyClass2' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass2' type=.MyClass2 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnOtherSuspendValueNative (): kotlin.String declared in .MyClass3' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass3' type=.MyClass3 origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass3' type=.MyClass3 origin=null + CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null + TYPE_ARG T: .MyClass4 + TYPE_ARG R: kotlin.Unit + ARG receiver: CONSTRUCTOR_CALL 'public constructor () declared in .MyClass4' type=.MyClass4 origin=null + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.MyClass4, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:.MyClass4 + BLOCK_BODY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box..' + CALL 'public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.String declared in .MyClass4' type=kotlin.String origin=null + ARG (index:0): GET_VAR '$this$with: .MyClass4 declared in .box..' type=.MyClass4 origin=IMPLICIT_ARGUMENT + ARG (index:1): CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass3' type=.MyClass3 origin=null + CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null + TYPE_ARG T: .MyClass5 + TYPE_ARG R: kotlin.Unit + ARG receiver: CONSTRUCTOR_CALL 'public constructor () declared in .MyClass5' type=.MyClass5 origin=null + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.MyClass5, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:.MyClass5 + BLOCK_BODY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box..' + CALL 'public final fun returnExtSuspendValueNative (: .MyClass1): kotlin.String declared in .MyClass5' type=kotlin.String origin=null + ARG (index:0): GET_VAR '$this$with: .MyClass5 declared in .box..' type=.MyClass5 origin=IMPLICIT_ARGUMENT + ARG (index:1): CONSTRUCTOR_CALL 'public constructor () declared in .MyClass1' type=.MyClass1 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass6' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass6' type=.MyClass6 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnExtSuspendValueNative (: .MyClass6): kotlin.String declared in ' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass6' type=.MyClass6 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnOtherSuspendValueNative (): kotlin.String declared in .MyClass7' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass7' type=.MyClass7 origin=null + FUN name:returnExtSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass6 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnExtSuspendValue (: .MyClass6): kotlin.String declared in ' + CONST String type=kotlin.String value="OK11" + PROPERTY name:flowExtProperty2 visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass3 + correspondingProperty: PROPERTY name:flowExtProperty2 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK8" +FILE fqName: fileName:__GENERATED DECLARATIONS__.kt + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnExtSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass6 + annotations: + ObjCName(name = "returnExtSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnExtSuspendValueNative (: .MyClass6): kotlin.String declared in ' + CALL 'public final fun returnExtSuspendValue (: .MyClass6): kotlin.String declared in ' type=kotlin.String origin=null + ARG : GET_VAR ': .MyClass6 declared in .returnExtSuspendValueNative' type=.MyClass6 origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' type=kotlinx.coroutines.CoroutineScope origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValueNative (): kotlin.String declared in ' + CALL 'public final fun returnSuspendValue (): kotlin.String declared in ' type=kotlin.String origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowExtProperty1Native visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "flowExtProperty1", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass3 + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowExtProperty1Native visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' type=kotlinx.coroutines.CoroutineScope origin=null + RETURN type=kotlin.Nothing from='public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + ARG : GET_VAR ': .MyClass3 declared in .' type=.MyClass3 origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowExtProperty2Native visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "flowExtProperty2", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass3 + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowExtProperty2Native visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass3' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyClass3 declared in .' type=.MyClass3 origin=null + RETURN type=kotlin.Nothing from='public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (: .MyClass3): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + ARG : GET_VAR ': .MyClass3 declared in .' type=.MyClass3 origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowPropertyNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "flowProperty", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:flowPropertyNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' type=kotlinx.coroutines.CoroutineScope origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt new file mode 100644 index 00000000..9f79869b --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt @@ -0,0 +1,274 @@ +// FILE: coroutinescope1.kt + +@NativeCoroutineScope +internal val coroutineScope1: CoroutineScope + field = CoroutineScope(context = Dispatchers.()) + internal get + +@NativeCoroutines +val flowProperty: Flow + field = flowOf(value = "OK2") + get + +open class MyClass1 { + @NativeCoroutineScope + protected val coroutineScope2: CoroutineScope + field = CoroutineScope(context = Dispatchers.()) + protected get + + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnSuspendValue") + suspend fun returnSuspendValueNative(): String { + val tmp_0: CoroutineScope = .() + return .returnSuspendValue() + } + + @NativeCoroutines + suspend fun returnSuspendValue(): String { + return "OK3" + } + +} + +class MyClass2 : MyClass1 { + @NativeCoroutines + val flowProperty: Flow + field = flowOf(value = "OK4") + get + + constructor() /* primary */ { + super/*MyClass1*/() + /* () */ + + } + + @ObjCName(name = "flowProperty") + val flowPropertyNative: Flow + get(): Flow { + val tmp_1: CoroutineScope = .() + return .() + } + +} + +class MyClass3 : MyClass1 { + @NativeCoroutineScope + internal val coroutineScope3: CoroutineScope + field = CoroutineScope(context = Dispatchers.()) + internal get + + constructor() /* primary */ { + super/*MyClass1*/() + /* () */ + + } + + @ObjCName(name = "returnOtherSuspendValue") + suspend fun returnOtherSuspendValueNative(): String { + val tmp_2: CoroutineScope = .() + return .returnOtherSuspendValue() + } + + @NativeCoroutines + suspend fun returnOtherSuspendValue(): String { + return "OK5" + } + +} + +class MyClass4 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnExtSuspendValue") + suspend fun MyClass1.returnExtSuspendValueNative(): String { + val tmp_3: CoroutineScope = () + return .returnExtSuspendValue(/* = */) + } + + @NativeCoroutines + suspend fun MyClass1.returnExtSuspendValue(): String { + return "OK7" + } + +} + +@NativeCoroutines +suspend fun returnSuspendValue(): String { + return "OK1" +} + +@NativeCoroutines +val MyClass3.flowExtProperty1: Flow + get(): Flow { + return flowOf(value = "OK6") + } + +// FILE: coroutinescope2.kt + +class MyClass5 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnExtSuspendValue") + suspend fun MyClass1.returnExtSuspendValueNative(): String { + val tmp_0: CoroutineScope? = null + return .returnExtSuspendValue(/* = */) + } + + @NativeCoroutines + suspend fun MyClass1.returnExtSuspendValue(): String { + return "OK9" + } + +} + +open class MyClass6 { + @NativeCoroutineScope + private val coroutineScope4: CoroutineScope + field = CoroutineScope(context = Dispatchers.()) + private get + + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnSuspendValue") + suspend fun returnSuspendValueNative(): String { + val tmp_1: CoroutineScope = .() + return .returnSuspendValue() + } + + @NativeCoroutines + suspend fun returnSuspendValue(): String { + return "OK10" + } + +} + +class MyClass7 : MyClass6 { + constructor() /* primary */ { + super/*MyClass6*/() + /* () */ + + } + + @ObjCName(name = "returnOtherSuspendValue") + suspend fun returnOtherSuspendValueNative(): String { + val tmp_2: CoroutineScope? = null + return .returnOtherSuspendValue() + } + + @NativeCoroutines + suspend fun returnOtherSuspendValue(): String { + return "OK12" + } + +} + +fun box(): String { + return runBoxTest(action = local suspend fun BoxTest.() { + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendValueNative() + } +) + $this$runBoxTest.collect(flow = ()) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass1().returnSuspendValueNative() + } +) + $this$runBoxTest.collect(flow = MyClass2().()) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass3().returnOtherSuspendValueNative() + } +) + $this$runBoxTest.collect(flow = (/* = MyClass3() */)) + with(receiver = MyClass4(), block = local fun MyClass4.() { + $this$runBoxTest.await(result = local suspend fun (): String { + return $this$with.returnExtSuspendValueNative(/* = MyClass1() */) + } +) + } +) + $this$runBoxTest.collect(flow = (/* = MyClass3() */)) + with(receiver = MyClass5(), block = local fun MyClass5.() { + $this$runBoxTest.await(result = local suspend fun (): String { + return $this$with.returnExtSuspendValueNative(/* = MyClass1() */) + } +) + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass6().returnSuspendValueNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnExtSuspendValueNative(/* = MyClass6() */) + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass7().returnOtherSuspendValueNative() + } +) + } +) +} + +@NativeCoroutines +suspend fun MyClass6.returnExtSuspendValue(): String { + return "OK11" +} + +@NativeCoroutines +val MyClass3.flowExtProperty2: Flow + get(): Flow { + return flowOf(value = "OK8") + } + +// FILE: __GENERATED DECLARATIONS__.kt + +@ObjCName(name = "returnExtSuspendValue") +suspend fun MyClass6.returnExtSuspendValueNative(): String { + val tmp_0: CoroutineScope? = null + return returnExtSuspendValue(/* = */) +} + +@ObjCName(name = "returnSuspendValue") +suspend fun returnSuspendValueNative(): String { + val tmp_1: CoroutineScope = () + return returnSuspendValue() +} + +@ObjCName(name = "flowExtProperty1") +val MyClass3.flowExtProperty1Native: Flow + get(): Flow { + val tmp_2: CoroutineScope = () + return (/* = */) + } + +@ObjCName(name = "flowExtProperty2") +val MyClass3.flowExtProperty2Native: Flow + get(): Flow { + val tmp_3: CoroutineScope = .() + return (/* = */) + } + +@ObjCName(name = "flowProperty") +val flowPropertyNative: Flow + get(): Flow { + val tmp_4: CoroutineScope = () + return () + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt new file mode 100644 index 00000000..e8eff001 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt @@ -0,0 +1,205 @@ +FILE: coroutinescope1.kt + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutineScope|() internal final val coroutineScope1: R|kotlinx/coroutines/CoroutineScope| = R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + internal get(): R|kotlinx/coroutines/CoroutineScope| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue(): R|kotlin/String| { + ^returnSuspendValue String(OK1) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val flowProperty: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK2)) + public get(): R|kotlinx/coroutines/flow/Flow| + public open class MyClass1 : R|kotlin/Any| { + public constructor(): R|MyClass1| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutineScope|() protected final val coroutineScope2: R|kotlinx/coroutines/CoroutineScope| = R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + protected get(): R|kotlinx/coroutines/CoroutineScope| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue(): R|kotlin/String| { + ^returnSuspendValue String(OK3) + } + + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + ::R|/MyClass1.returnSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public final class MyClass2 : R|MyClass1| { + public constructor(): R|MyClass2| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val flowProperty: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK4)) + public get(): R|kotlinx/coroutines/flow/Flow| + + @R|kotlin/native/ObjCName|(name = String(flowProperty)) public final val flowPropertyNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/MyClass2.flowProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public final class MyClass3 : R|MyClass1| { + public constructor(): R|MyClass3| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutineScope|() internal final val coroutineScope3: R|kotlinx/coroutines/CoroutineScope| = R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + internal get(): R|kotlinx/coroutines/CoroutineScope| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnOtherSuspendValue(): R|kotlin/String| { + ^returnOtherSuspendValue String(OK5) + } + + @R|kotlin/native/ObjCName|(name = String(returnOtherSuspendValue)) public final suspend fun returnOtherSuspendValueNative(): R|kotlin/String| { + ::R|/MyClass3.returnOtherSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|MyClass3|.flowExtProperty1: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ^ R|kotlinx/coroutines/flow/flowOf|(String(OK6)) + } + public final class MyClass4 : R|kotlin/Any| { + public constructor(): R|MyClass4| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|MyClass1|.returnExtSuspendValue(): R|kotlin/String| { + ^returnExtSuspendValue String(OK7) + } + + @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) public final suspend fun R|MyClass1|.returnExtSuspendValueNative(): R|kotlin/String| { + ::R|/MyClass4.returnExtSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } +FILE: coroutinescope2.kt + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|MyClass3|.flowExtProperty2: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ^ R|kotlinx/coroutines/flow/flowOf|(String(OK8)) + } + public final class MyClass5 : R|kotlin/Any| { + public constructor(): R|MyClass5| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|MyClass1|.returnExtSuspendValue(): R|kotlin/String| { + ^returnExtSuspendValue String(OK9) + } + + @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) public final suspend fun R|MyClass1|.returnExtSuspendValueNative(): R|kotlin/String| { + ::R|/MyClass5.returnExtSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public open class MyClass6 : R|kotlin/Any| { + public constructor(): R|MyClass6| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutineScope|() private final val coroutineScope4: R|kotlinx/coroutines/CoroutineScope| = R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + private get(): R|kotlinx/coroutines/CoroutineScope| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue(): R|kotlin/String| { + ^returnSuspendValue String(OK10) + } + + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + ::R|/MyClass6.returnSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|MyClass6|.returnExtSuspendValue(): R|kotlin/String| { + ^returnExtSuspendValue String(OK11) + } + public final class MyClass7 : R|MyClass6| { + public constructor(): R|MyClass7| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnOtherSuspendValue(): R|kotlin/String| { + ^returnOtherSuspendValue String(OK12) + } + + @R|kotlin/native/ObjCName|(name = String(returnOtherSuspendValue)) public final suspend fun returnOtherSuspendValueNative(): R|kotlin/String| { + ::R|/MyClass7.returnOtherSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public final fun box(): R|kotlin/String| { + ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/flowPropertyNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass1.MyClass1|().R|/MyClass1.returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyClass2.MyClass2|().R|/MyClass2.flowPropertyNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass3.MyClass3|().R|/MyClass3.returnOtherSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyClass3.MyClass3|().R|/flowExtProperty1Native|) + R|kotlin/with|(R|/MyClass4.MyClass4|(), = with@fun R|MyClass4|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ (this@R|special/anonymous|, R|/MyClass1.MyClass1|()).R|/MyClass4.returnExtSuspendValueNative|() + } + ) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyClass3.MyClass3|().R|/flowExtProperty2Native|) + R|kotlin/with|(R|/MyClass5.MyClass5|(), = with@fun R|MyClass5|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ (this@R|special/anonymous|, R|/MyClass1.MyClass1|()).R|/MyClass5.returnExtSuspendValueNative|() + } + ) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass6.MyClass6|().R|/MyClass6.returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass6.MyClass6|().R|/returnExtSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass7.MyClass7|().R|/MyClass7.returnOtherSuspendValueNative|() + } + ) + } + ) + } +FILE: __GENERATED DECLARATIONS__.kt + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + ::R|/returnSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(flowProperty)) public final val flowPropertyNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/flowProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(flowExtProperty1)) public final val R|MyClass3|.flowExtProperty1Native: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/flowExtProperty1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(flowExtProperty2)) public final val R|MyClass3|.flowExtProperty2Native: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/flowExtProperty2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) public final suspend fun R|MyClass6|.returnExtSuspendValueNative(): R|kotlin/String| { + ::R|/returnExtSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.kt new file mode 120000 index 00000000..081b8262 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.kt @@ -0,0 +1 @@ +../coroutinescope.kt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.box.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.box.txt new file mode 120000 index 00000000..e1ce6373 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.box.txt @@ -0,0 +1 @@ +../functions.box.txt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt new file mode 100644 index 00000000..a7e0294e --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt @@ -0,0 +1,817 @@ +FILE fqName: fileName:/functions.kt + CLASS CLASS name:MyClass14 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass14.MyClass14> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + PROPERTY name:value visibility:private modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyClass14 visibility:private [final] + EXPRESSION_BODY + GET_VAR 'value: T of .MyClass14 declared in .MyClass14.' type=T of .MyClass14 origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL returnType:T of .MyClass14 + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass14.MyClass14> + correspondingProperty: PROPERTY name:value visibility:private modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): T of .MyClass14 declared in .MyClass14' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyClass14 visibility:private [final]' type=T of .MyClass14 origin=null + receiver: GET_VAR ': .MyClass14.MyClass14> declared in .MyClass14.' type=.MyClass14.MyClass14> origin=null + CONSTRUCTOR visibility:public returnType:.MyClass14.MyClass14> [primary] + VALUE_PARAMETER kind:Regular name:value index:0 type:T of .MyClass14 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass14 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnGenericSuspendValueNative visibility:public modality:FINAL returnType:T of .MyClass14 [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass14.MyClass14> + annotations: + ObjCName(name = "returnGenericSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnGenericSuspendValueNative (): T of .MyClass14 declared in .MyClass14' + CALL 'public final fun returnGenericSuspendValue (): T of .MyClass14 declared in .MyClass14' type=T of .MyClass14 origin=null + ARG : GET_VAR ': .MyClass14.MyClass14> declared in .MyClass14.returnGenericSuspendValueNative' type=.MyClass14.MyClass14> origin=null + FUN name:returnGenericSuspendValue visibility:public modality:FINAL returnType:T of .MyClass14 [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass14.MyClass14> + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnGenericSuspendValue (): T of .MyClass14 declared in .MyClass14' + CALL 'private final fun (): T of .MyClass14 declared in .MyClass14' type=T of .MyClass14 origin=GET_PROPERTY + ARG : GET_VAR ': .MyClass14.MyClass14> declared in .MyClass14.returnGenericSuspendValue' type=.MyClass14.MyClass14> origin=IMPLICIT_ARGUMENT + CLASS CLASS name:MyClass16 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass16 + CONSTRUCTOR visibility:public returnType:.MyClass16 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass16 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:functionWithGenericValuesNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T1 index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T2 index:1 variance: superTypes:[T1 of .MyClass16.functionWithGenericValuesNative] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass16 + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value1 index:1 type:T1 of .MyClass16.functionWithGenericValuesNative + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value2 index:2 type:T2 of .MyClass16.functionWithGenericValuesNative + annotations: + ObjCName(name = "functionWithGenericValues", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun functionWithGenericValuesNative (value1: T1 of .MyClass16.functionWithGenericValuesNative, value2: T2 of .MyClass16.functionWithGenericValuesNative): kotlin.String declared in .MyClass16' + CALL 'public final fun functionWithGenericValues (value1: T1 of .MyClass16.functionWithGenericValues, value2: T2 of .MyClass16.functionWithGenericValues): kotlin.String declared in .MyClass16' type=kotlin.String origin=null + TYPE_ARG T1: T1 of .MyClass16.functionWithGenericValuesNative + TYPE_ARG T2: T2 of .MyClass16.functionWithGenericValuesNative + ARG : GET_VAR ': .MyClass16 declared in .MyClass16.functionWithGenericValuesNative' type=.MyClass16 origin=null + ARG value1: GET_VAR 'value1: T1 of .MyClass16.functionWithGenericValuesNative declared in .MyClass16.functionWithGenericValuesNative' type=T1 of .MyClass16.functionWithGenericValuesNative origin=null + ARG value2: GET_VAR 'value2: T2 of .MyClass16.functionWithGenericValuesNative declared in .MyClass16.functionWithGenericValuesNative' type=T2 of .MyClass16.functionWithGenericValuesNative origin=null + FUN name:functionWithGenericValues visibility:public modality:FINAL returnType:kotlin.String [suspend] + TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:T2 index:1 variance: superTypes:[T1 of .MyClass16.functionWithGenericValues] reified:false + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass16 + VALUE_PARAMETER kind:Regular name:value1 index:1 type:T1 of .MyClass16.functionWithGenericValues + VALUE_PARAMETER kind:Regular name:value2 index:2 type:T2 of .MyClass16.functionWithGenericValues + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun functionWithGenericValues (value1: T1 of .MyClass16.functionWithGenericValues, value2: T2 of .MyClass16.functionWithGenericValues): kotlin.String declared in .MyClass16' + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS + ARG : CALL 'public final fun toString (: kotlin.Any?): kotlin.String declared in kotlin' type=kotlin.String origin=null + ARG : GET_VAR 'value1: T1 of .MyClass16.functionWithGenericValues declared in .MyClass16.functionWithGenericValues' type=T1 of .MyClass16.functionWithGenericValues origin=null + ARG other: CALL 'public final fun toString (: kotlin.Any?): kotlin.String declared in kotlin' type=kotlin.String origin=null + ARG : GET_VAR 'value2: T2 of .MyClass16.functionWithGenericValues declared in .MyClass16.functionWithGenericValues' type=T2 of .MyClass16.functionWithGenericValues origin=null + CLASS CLASS name:MyClass20 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass20 + CONSTRUCTOR visibility:public returnType:.MyClass20 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass20 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnClassExtensionValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass20 + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.String + annotations: + ObjCName(name = "returnClassExtensionValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnClassExtensionValueNative (: kotlin.String): kotlin.String declared in .MyClass20' + CALL 'public final fun returnClassExtensionValue (: kotlin.String): kotlin.String declared in .MyClass20' type=kotlin.String origin=null + ARG (index:0): GET_VAR '(index:0): .MyClass20 declared in .MyClass20.returnClassExtensionValueNative' type=.MyClass20 origin=null + ARG (index:1): GET_VAR '(index:1): kotlin.String declared in .MyClass20.returnClassExtensionValueNative' type=kotlin.String origin=null + FUN name:returnClassExtensionValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass20 + VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.String + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnClassExtensionValue (: kotlin.String): kotlin.String declared in .MyClass20' + GET_VAR '(index:1): kotlin.String declared in .MyClass20.returnClassExtensionValue' type=kotlin.String origin=null + CLASS CLASS name:MyClass21 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass21.MyClass21> + TYPE_PARAMETER name:T index:0 variance:out superTypes:[kotlin.Any?] reified:false + CONSTRUCTOR visibility:public returnType:.MyClass21.MyClass21> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass21 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnGenericValueNative visibility:public modality:FINAL returnType:T of .MyClass21? [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass21.MyClass21> + annotations: + ObjCName(name = "returnGenericValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnGenericValueNative (): T of .MyClass21? declared in .MyClass21' + CALL 'public final fun returnGenericValue (): T of .MyClass21? declared in .MyClass21' type=T of .MyClass21? origin=null + ARG : GET_VAR ': .MyClass21.MyClass21> declared in .MyClass21.returnGenericValueNative' type=.MyClass21.MyClass21> origin=null + FUN name:returnGenericValue visibility:public modality:FINAL returnType:T of .MyClass21? [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass21.MyClass21> + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnGenericValue (): T of .MyClass21? declared in .MyClass21' + CONST Null type=kotlin.Nothing? value=null + CLASS CLASS name:MyClass22 modality:FINAL visibility:public superTypes:[.MyInterface22] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass22 + CONSTRUCTOR visibility:public returnType:.MyClass22 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass22 modality:FINAL visibility:public superTypes:[.MyInterface22]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyInterface22 + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in .MyInterface22 + FUN FAKE_OVERRIDE name:returnInterfaceSuspendValueNative visibility:public modality:OPEN returnType:kotlin.String [suspend,fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface22 + annotations: + ObjCName(name = "returnInterfaceSuspendValue", swiftName = , exact = ) + overridden: + public open fun returnInterfaceSuspendValueNative (): kotlin.String declared in .MyInterface22 + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in .MyInterface22 + FUN name:returnInterfaceSuspendValue visibility:public modality:OPEN returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass22 + annotations: + NativeCoroutines + overridden: + public abstract fun returnInterfaceSuspendValue (): kotlin.String declared in .MyInterface22 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun returnInterfaceSuspendValue (): kotlin.String declared in .MyClass22' + CONST String type=kotlin.String value="OK22" + CLASS CLASS name:MyClass8 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass8 + CONSTRUCTOR visibility:public returnType:.MyClass8 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass8 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass8 + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass8' + CALL 'public final fun returnSuspendValue (): kotlin.String declared in .MyClass8' type=kotlin.String origin=null + ARG : GET_VAR ': .MyClass8 declared in .MyClass8.returnSuspendValueNative' type=.MyClass8 origin=null + FUN name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass8 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue (): kotlin.String declared in .MyClass8' + CONST String type=kotlin.String value="OK8" + CLASS CLASS name:MyFlow23 modality:FINAL visibility:public superTypes:[kotlinx.coroutines.flow.Flow.MyFlow23>] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyFlow23.MyFlow23, T2 of .MyFlow23> + TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:T2 index:1 variance: superTypes:[kotlin.Any?] reified:false + FIELD DELEGATE name:$$delegate_0 type:kotlinx.coroutines.flow.Flow.MyFlow23> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow.MyFlow23> origin=null + TYPE_ARG T: T2 of .MyFlow23 + ARG value: GET_VAR 'value2: T2 of .MyFlow23 declared in .MyFlow23.' type=T2 of .MyFlow23 origin=null + CONSTRUCTOR visibility:public returnType:.MyFlow23.MyFlow23, T2 of .MyFlow23> [primary] + VALUE_PARAMETER kind:Regular name:value1 index:0 type:T1 of .MyFlow23 + VALUE_PARAMETER kind:Regular name:value2 index:1 type:T2 of .MyFlow23 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyFlow23 modality:FINAL visibility:public superTypes:[kotlinx.coroutines.flow.Flow.MyFlow23>]' type=kotlin.Unit + FUN DELEGATED_MEMBER name:collect visibility:public modality:OPEN returnType:kotlin.Unit [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyFlow23.MyFlow23, T2 of .MyFlow23> + VALUE_PARAMETER kind:Regular name:collector index:1 type:kotlinx.coroutines.flow.FlowCollector.MyFlow23> + overridden: + public abstract fun collect (collector: kotlinx.coroutines.flow.FlowCollector): kotlin.Unit declared in kotlinx.coroutines.flow.Flow + BLOCK_BODY + CALL 'public abstract fun collect (collector: kotlinx.coroutines.flow.FlowCollector): kotlin.Unit declared in kotlinx.coroutines.flow.Flow' type=kotlin.Unit origin=null + ARG : GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:kotlinx.coroutines.flow.Flow.MyFlow23> visibility:private [final] declared in .MyFlow23' type=kotlinx.coroutines.flow.Flow.MyFlow23> origin=null + receiver: GET_VAR ': .MyFlow23.MyFlow23, T2 of .MyFlow23> declared in .MyFlow23.collect' type=.MyFlow23.MyFlow23, T2 of .MyFlow23> origin=null + ARG collector: GET_VAR 'collector: kotlinx.coroutines.flow.FlowCollector.MyFlow23> declared in .MyFlow23.collect' type=kotlinx.coroutines.flow.FlowCollector.MyFlow23> origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlinx.coroutines.flow.Flow + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlinx.coroutines.flow.Flow + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlinx.coroutines.flow.Flow + CLASS INTERFACE name:MyInterface22 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyInterface22 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnInterfaceSuspendValueNative visibility:public modality:OPEN returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface22 + annotations: + ObjCName(name = "returnInterfaceSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public open fun returnInterfaceSuspendValueNative (): kotlin.String declared in .MyInterface22' + CALL 'public abstract fun returnInterfaceSuspendValue (): kotlin.String declared in .MyInterface22' type=kotlin.String origin=null + ARG : GET_VAR ': .MyInterface22 declared in .MyInterface22.returnInterfaceSuspendValueNative' type=.MyInterface22 origin=null + FUN name:returnInterfaceSuspendValue visibility:public modality:ABSTRACT returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface22 + annotations: + NativeCoroutines + FUN name:box visibility:public modality:FINAL returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CALL 'public final fun runBoxTest (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.String declared in com.rickclephas.kmp.nativecoroutines' type=kotlin.String origin=null + ARG action: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest + BLOCK_BODY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String? [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .box.' + CALL 'public final fun returnNullableSuspendValueNative (): kotlin.String? declared in ' type=kotlin.String? origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun returnFlowValueNative (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun returnNullableFlowValueNative (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.Flow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun returnNullableFlowNative (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.Flow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun returnNullableFlowAndValueNative (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun returnStateFlowValueNative (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass8' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass8' type=.MyClass8 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendParameterValueNative (value: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG value: CONST String type=kotlin.String value="OK9" + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.Int + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Int [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .box.' + CALL 'public final fun returnSuspendParameterValueNative (value: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null + ARG value: CONST Int type=kotlin.Int value=9 + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnThrowsSuspendValueNative (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendVarargValueNative (vararg values: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG values: VARARG type=kotlin.Array varargElementType=kotlin.String + CONST String type=kotlin.String value="OK11" + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnGenericSuspendValueNative (): T of .MyClass14 declared in .MyClass14' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyClass14) declared in .MyClass14' type=.MyClass14 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK12" + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnRefinedSuspendValueNative (): kotlin.String declared in ' type=kotlin.String origin=null + CALL 'public final fun awaitAndCollect (maxValues: kotlin.Int?, flow: kotlin.coroutines.SuspendFunction0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: FUN_EXPR type=kotlin.coroutines.SuspendFunction0> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlinx.coroutines.flow.Flow [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlinx.coroutines.flow.Flow declared in .box.' + CALL 'public final fun returnSuspendFlowValueNative (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnGenericSuspendValueNative (value: T of .returnGenericSuspendValueNative): T of .returnGenericSuspendValueNative declared in ' type=kotlin.String origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK15" + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun functionWithGenericValuesNative (value1: T1 of .MyClass16.functionWithGenericValuesNative, value2: T2 of .MyClass16.functionWithGenericValuesNative): kotlin.String declared in .MyClass16' type=kotlin.String origin=null + TYPE_ARG T1: kotlin.CharSequence + TYPE_ARG T2: kotlin.String + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass16' type=.MyClass16 origin=null + ARG value1: CONST String type=kotlin.String value="OK" + ARG value2: CONST String type=kotlin.String value="16" + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnInlineSuspendValueNative (value: T of .returnInlineSuspendValueNative): T of .returnInlineSuspendValueNative declared in ' type=kotlin.String origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK17" + CALL 'public final fun awaitAndCollectNull (flow: kotlin.coroutines.SuspendFunction0?>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: FUN_EXPR type=kotlin.coroutines.SuspendFunction0?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlinx.coroutines.flow.Flow? [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlinx.coroutines.flow.Flow? declared in .box.' + CALL 'public final fun returnNullableSuspendFlowNative (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnExtensionValueNative (: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG : CONST String type=kotlin.String value="OK19" + CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null + TYPE_ARG T: .MyClass20 + TYPE_ARG R: kotlin.Unit + ARG receiver: CONSTRUCTOR_CALL 'public constructor () declared in .MyClass20' type=.MyClass20 origin=null + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.MyClass20, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$with index:0 type:.MyClass20 + BLOCK_BODY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box..' + CALL 'public final fun returnClassExtensionValueNative (: kotlin.String): kotlin.String declared in .MyClass20' type=kotlin.String origin=null + ARG (index:0): GET_VAR '$this$with: .MyClass20 declared in .box..' type=.MyClass20 origin=IMPLICIT_ARGUMENT + ARG (index:1): CONST String type=kotlin.String value="OK20" + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String? [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .box.' + CALL 'public final fun returnGenericValueNative (): T of .MyClass21? declared in .MyClass21' type=kotlin.String? origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass21' type=.MyClass21 origin=null + TYPE_ARG (of class) T: kotlin.String + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public open fun returnInterfaceSuspendValueNative (): kotlin.String declared in .MyClass22' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass22' type=.MyClass22 origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun returnCustomFlowValueNative (): .MyFlow23 declared in ' type=.MyFlow23 origin=null + FUN name:returnCustomFlowValue visibility:public modality:FINAL returnType:.MyFlow23 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnCustomFlowValue (): .MyFlow23 declared in ' + CONSTRUCTOR_CALL 'public constructor (value1: T1 of .MyFlow23, value2: T2 of .MyFlow23) declared in .MyFlow23' type=.MyFlow23 origin=null + TYPE_ARG (of class) T1: kotlin.Int + TYPE_ARG (of class) T2: kotlin.String + ARG value1: CONST Int type=kotlin.Int value=23 + ARG value2: CONST String type=kotlin.String value="OK23" + FUN name:returnExtensionValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnExtensionValue (: kotlin.String): kotlin.String declared in ' + GET_VAR ': kotlin.String declared in .returnExtensionValue' type=kotlin.String origin=null + FUN name:returnFlowValue visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnFlowValue (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK3" + FUN name:returnGenericSuspendValue visibility:public modality:FINAL returnType:T of .returnGenericSuspendValue [suspend] + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:Regular name:value index:0 type:T of .returnGenericSuspendValue + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnGenericSuspendValue (value: T of .returnGenericSuspendValue): T of .returnGenericSuspendValue declared in ' + GET_VAR 'value: T of .returnGenericSuspendValue declared in .returnGenericSuspendValue' type=T of .returnGenericSuspendValue origin=null + FUN name:returnInlineSuspendValue visibility:public modality:FINAL returnType:T of .returnInlineSuspendValue [inline,suspend] + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:true + VALUE_PARAMETER kind:Regular name:value index:0 type:T of .returnInlineSuspendValue + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnInlineSuspendValue (value: T of .returnInlineSuspendValue): T of .returnInlineSuspendValue declared in ' + GET_VAR 'value: T of .returnInlineSuspendValue declared in .returnInlineSuspendValue' type=T of .returnInlineSuspendValue origin=null + FUN name:returnNullableFlow visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnNullableFlow (): kotlinx.coroutines.flow.Flow? declared in ' + CONST Null type=kotlin.Nothing? value=null + FUN name:returnNullableFlowAndValue visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnNullableFlowAndValue (): kotlinx.coroutines.flow.Flow? declared in ' + CONST Null type=kotlin.Nothing? value=null + FUN name:returnNullableFlowValue visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnNullableFlowValue (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String? + ARG value: CONST Null type=kotlin.Nothing? value=null + FUN name:returnNullableSuspendFlow visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? [suspend] + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnNullableSuspendFlow (): kotlinx.coroutines.flow.Flow? declared in ' + CONST Null type=kotlin.Nothing? value=null + FUN name:returnNullableSuspendValue visibility:public modality:FINAL returnType:kotlin.String? [suspend] + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnNullableSuspendValue (): kotlin.String? declared in ' + CONST Null type=kotlin.Nothing? value=null + FUN name:returnRefinedSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutinesRefined + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnRefinedSuspendValue (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK13" + FUN name:returnStateFlowValue visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnStateFlowValue (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK7" + FUN name:returnSuspendFlowValue visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow [suspend] + annotations: + NativeCoroutinesRefined + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendFlowValue (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK14" + FUN name:returnSuspendParameterValue visibility:public modality:FINAL returnType:kotlin.Int [suspend] + VALUE_PARAMETER kind:Regular name:value index:0 type:kotlin.Int + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendParameterValue (value: kotlin.Int): kotlin.Int declared in ' + GET_VAR 'value: kotlin.Int declared in .returnSuspendParameterValue' type=kotlin.Int origin=null + FUN name:returnSuspendParameterValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:Regular name:value index:0 type:kotlin.String + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendParameterValue (value: kotlin.String): kotlin.String declared in ' + GET_VAR 'value: kotlin.String declared in .returnSuspendParameterValue' type=kotlin.String origin=null + FUN name:returnSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK1" + FUN name:returnSuspendVarargValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:Regular name:values index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendVarargValue (vararg values: kotlin.String): kotlin.String declared in ' + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT + ARG : GET_VAR 'values: kotlin.Array declared in .returnSuspendVarargValue' type=kotlin.Array origin=null + ARG index: CONST Int type=kotlin.Int value=0 + FUN name:returnThrowsSuspendValue visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnThrowsSuspendValue (): kotlin.String declared in ' + CONST String type=kotlin.String value="OK10" +FILE fqName: fileName:__GENERATED DECLARATIONS__.kt + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnCustomFlowValueNative visibility:public modality:FINAL returnType:.MyFlow23 + annotations: + ObjCName(name = "returnCustomFlowValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnCustomFlowValueNative (): .MyFlow23 declared in ' + CALL 'public final fun returnCustomFlowValue (): .MyFlow23 declared in ' type=.MyFlow23 origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnExtensionValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + annotations: + ObjCName(name = "returnExtensionValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnExtensionValueNative (: kotlin.String): kotlin.String declared in ' + CALL 'public final fun returnExtensionValue (: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG : GET_VAR ': kotlin.String declared in .returnExtensionValueNative' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnFlowValueNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + annotations: + ObjCName(name = "returnFlowValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnFlowValueNative (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun returnFlowValue (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnGenericSuspendValueNative visibility:public modality:FINAL returnType:T of .returnGenericSuspendValueNative [suspend] + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:T of .returnGenericSuspendValueNative + annotations: + ObjCName(name = "returnGenericSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnGenericSuspendValueNative (value: T of .returnGenericSuspendValueNative): T of .returnGenericSuspendValueNative declared in ' + CALL 'public final fun returnGenericSuspendValue (value: T of .returnGenericSuspendValue): T of .returnGenericSuspendValue declared in ' type=T of .returnGenericSuspendValue origin=null + TYPE_ARG T: T of .returnGenericSuspendValueNative + ARG value: GET_VAR 'value: T of .returnGenericSuspendValueNative declared in .returnGenericSuspendValueNative' type=T of .returnGenericSuspendValueNative origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnInlineSuspendValueNative visibility:public modality:FINAL returnType:T of .returnInlineSuspendValueNative [inline,suspend] + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T index:0 variance: superTypes:[kotlin.Any?] reified:true + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:T of .returnInlineSuspendValueNative + annotations: + ObjCName(name = "returnInlineSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnInlineSuspendValueNative (value: T of .returnInlineSuspendValueNative): T of .returnInlineSuspendValueNative declared in ' + CALL 'public final fun returnInlineSuspendValue (value: T of .returnInlineSuspendValue): T of .returnInlineSuspendValue declared in ' type=T of .returnInlineSuspendValue origin=null + TYPE_ARG T: T of .returnInlineSuspendValueNative + ARG value: GET_VAR 'value: T of .returnInlineSuspendValueNative declared in .returnInlineSuspendValueNative' type=T of .returnInlineSuspendValueNative origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnNullableFlowAndValueNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + annotations: + ObjCName(name = "returnNullableFlowAndValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnNullableFlowAndValueNative (): kotlinx.coroutines.flow.Flow? declared in ' + CALL 'public final fun returnNullableFlowAndValue (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnNullableFlowNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + annotations: + ObjCName(name = "returnNullableFlow", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnNullableFlowNative (): kotlinx.coroutines.flow.Flow? declared in ' + CALL 'public final fun returnNullableFlow (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnNullableFlowValueNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + annotations: + ObjCName(name = "returnNullableFlowValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnNullableFlowValueNative (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun returnNullableFlowValue (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnNullableSuspendFlowNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? [suspend] + annotations: + ObjCName(name = "returnNullableSuspendFlow", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnNullableSuspendFlowNative (): kotlinx.coroutines.flow.Flow? declared in ' + CALL 'public final fun returnNullableSuspendFlow (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnNullableSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String? [suspend] + annotations: + ObjCName(name = "returnNullableSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnNullableSuspendValueNative (): kotlin.String? declared in ' + CALL 'public final fun returnNullableSuspendValue (): kotlin.String? declared in ' type=kotlin.String? origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnRefinedSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + ObjCName(name = "returnRefinedSuspendValue", swiftName = , exact = ) + ShouldRefineInSwift + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnRefinedSuspendValueNative (): kotlin.String declared in ' + CALL 'public final fun returnRefinedSuspendValue (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnStateFlowValueNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + annotations: + ObjCName(name = "returnStateFlowValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnStateFlowValueNative (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun returnStateFlowValue (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendFlowValueNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow [suspend] + annotations: + ObjCName(name = "returnSuspendFlowValue", swiftName = , exact = ) + ShouldRefineInSwift + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendFlowValueNative (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun returnSuspendFlowValue (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendParameterValueNative visibility:public modality:FINAL returnType:kotlin.Int [suspend] + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.Int + annotations: + ObjCName(name = "returnSuspendParameterValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendParameterValueNative (value: kotlin.Int): kotlin.Int declared in ' + CALL 'public final fun returnSuspendParameterValue (value: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null + ARG value: GET_VAR 'value: kotlin.Int declared in .returnSuspendParameterValueNative' type=kotlin.Int origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendParameterValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.String + annotations: + ObjCName(name = "returnSuspendParameterValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendParameterValueNative (value: kotlin.String): kotlin.String declared in ' + CALL 'public final fun returnSuspendParameterValue (value: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG value: GET_VAR 'value: kotlin.String declared in .returnSuspendParameterValueNative' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValueNative (): kotlin.String declared in ' + CALL 'public final fun returnSuspendValue (): kotlin.String declared in ' type=kotlin.String origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendVarargValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:values index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + annotations: + ObjCName(name = "returnSuspendVarargValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendVarargValueNative (vararg values: kotlin.String): kotlin.String declared in ' + CALL 'public final fun returnSuspendVarargValue (vararg values: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + ARG values: GET_VAR 'values: kotlin.Array declared in .returnSuspendVarargValueNative' type=kotlin.Array origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnThrowsSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] + annotations: + ObjCName(name = "returnThrowsSuspendValue", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun returnThrowsSuspendValueNative (): kotlin.String declared in ' + CALL 'public final fun returnThrowsSuspendValue (): kotlin.String declared in ' type=kotlin.String origin=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt new file mode 100644 index 00000000..4b698753 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt @@ -0,0 +1,434 @@ +// FILE: functions.kt + +class MyClass14 { + private val value: T + field = value + private get + + constructor(value: T) /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnGenericSuspendValue") + suspend fun returnGenericSuspendValueNative(): T { + val tmp_0: CoroutineScope? = null + return .returnGenericSuspendValue() + } + + @NativeCoroutines + suspend fun returnGenericSuspendValue(): T { + return .() + } + +} + +class MyClass16 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "functionWithGenericValues") + suspend fun functionWithGenericValuesNative(value1: T1, value2: T2): String { + val tmp_1: CoroutineScope? = null + return .functionWithGenericValues(value1 = value1, value2 = value2) + } + + @NativeCoroutines + suspend fun functionWithGenericValues(value1: T1, value2: T2): String { + return toString(/* = value1 */).plus(other = toString(/* = value2 */)) + } + +} + +class MyClass20 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnClassExtensionValue") + suspend fun String.returnClassExtensionValueNative(): String { + val tmp_2: CoroutineScope? = null + return .returnClassExtensionValue(/* = */) + } + + @NativeCoroutines + suspend fun String.returnClassExtensionValue(): String { + return + } + +} + +class MyClass21 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnGenericValue") + suspend fun returnGenericValueNative(): T? { + val tmp_3: CoroutineScope? = null + return .returnGenericValue() + } + + @NativeCoroutines + suspend fun returnGenericValue(): T? { + return null + } + +} + +class MyClass22 : MyInterface22 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @NativeCoroutines + override suspend fun returnInterfaceSuspendValue(): String { + return "OK22" + } + +} + +class MyClass8 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "returnSuspendValue") + suspend fun returnSuspendValueNative(): String { + val tmp_4: CoroutineScope? = null + return .returnSuspendValue() + } + + @NativeCoroutines + suspend fun returnSuspendValue(): String { + return "OK8" + } + +} + +class MyFlow23 : Flow { + private /* final field */ val $$delegate_0: Flow = flowOf(value = value2) + constructor(value1: T1, value2: T2) /* primary */ { + super/*Any*/() + /* () */ + + } + + override suspend fun collect(collector: FlowCollector) { + .#$$delegate_0.collect(collector = collector) + } + +} + +interface MyInterface22 { + @ObjCName(name = "returnInterfaceSuspendValue") + suspend fun returnInterfaceSuspendValueNative(): String { + val tmp_5: CoroutineScope? = null + return .returnInterfaceSuspendValue() + } + + @NativeCoroutines + abstract suspend fun returnInterfaceSuspendValue(): String + +} + +fun box(): String { + return runBoxTest(action = local suspend fun BoxTest.() { + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendValueNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String? { + return returnNullableSuspendValueNative() + } +) + $this$runBoxTest.collect(flow = returnFlowValueNative()) + $this$runBoxTest.collect(flow = returnNullableFlowValueNative()) + $this$runBoxTest.value?>(value = returnNullableFlowNative()) + $this$runBoxTest.value?>(value = returnNullableFlowAndValueNative()) + $this$runBoxTest.collect(flow = returnStateFlowValueNative(), maxValues = 1) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass8().returnSuspendValueNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendParameterValueNative(value = "OK9") + } +) + $this$runBoxTest.await(result = local suspend fun (): Int { + return returnSuspendParameterValueNative(value = 9) + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnThrowsSuspendValueNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendVarargValueNative(values = ["OK11"]) + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass14(value = "OK12").returnGenericSuspendValueNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnRefinedSuspendValueNative() + } +) + $this$runBoxTest.awaitAndCollect(flow = local suspend fun (): Flow { + return returnSuspendFlowValueNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnGenericSuspendValueNative(value = "OK15") + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass16().functionWithGenericValuesNative(value1 = "OK", value2 = "16") + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnInlineSuspendValueNative(value = "OK17") + } +) + $this$runBoxTest.awaitAndCollectNull(flow = local suspend fun (): Flow? { + return returnNullableSuspendFlowNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnExtensionValueNative(/* = "OK19" */) + } +) + with(receiver = MyClass20(), block = local fun MyClass20.() { + $this$runBoxTest.await(result = local suspend fun (): String { + return $this$with.returnClassExtensionValueNative(/* = "OK20" */) + } +) + } +) + $this$runBoxTest.await(result = local suspend fun (): String? { + return MyClass21().returnGenericValueNative() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyClass22().returnInterfaceSuspendValueNative() + } +) + $this$runBoxTest.collect(flow = returnCustomFlowValueNative()) + } +) +} + +@NativeCoroutines +fun returnCustomFlowValue(): MyFlow23 { + return MyFlow23(value1 = 23, value2 = "OK23") +} + +@NativeCoroutines +suspend fun String.returnExtensionValue(): String { + return +} + +@NativeCoroutines +fun returnFlowValue(): Flow { + return flowOf(value = "OK3") +} + +@NativeCoroutines +suspend fun returnGenericSuspendValue(value: T): T { + return value +} + +@NativeCoroutines +suspend inline fun returnInlineSuspendValue(value: T): T { + return value +} + +@NativeCoroutines +fun returnNullableFlow(): Flow? { + return null +} + +@NativeCoroutines +fun returnNullableFlowAndValue(): Flow? { + return null +} + +@NativeCoroutines +fun returnNullableFlowValue(): Flow { + return flowOf(value = null) +} + +@NativeCoroutines +suspend fun returnNullableSuspendFlow(): Flow? { + return null +} + +@NativeCoroutines +suspend fun returnNullableSuspendValue(): String? { + return null +} + +@NativeCoroutinesRefined +suspend fun returnRefinedSuspendValue(): String { + return "OK13" +} + +@NativeCoroutines +fun returnStateFlowValue(): StateFlow { + return MutableStateFlow(value = "OK7") +} + +@NativeCoroutinesRefined +suspend fun returnSuspendFlowValue(): Flow { + return flowOf(value = "OK14") +} + +@NativeCoroutines +suspend fun returnSuspendParameterValue(value: Int): Int { + return value +} + +@NativeCoroutines +suspend fun returnSuspendParameterValue(value: String): String { + return value +} + +@NativeCoroutines +suspend fun returnSuspendValue(): String { + return "OK1" +} + +@NativeCoroutines +suspend fun returnSuspendVarargValue(vararg values: String): String { + return values.get(index = 0) +} + +@NativeCoroutines +suspend fun returnThrowsSuspendValue(): String { + return "OK10" +} + +// FILE: __GENERATED DECLARATIONS__.kt + +@ObjCName(name = "returnCustomFlowValue") +fun returnCustomFlowValueNative(): MyFlow23 { + val tmp_0: CoroutineScope? = null + return returnCustomFlowValue() +} + +@ObjCName(name = "returnExtensionValue") +suspend fun String.returnExtensionValueNative(): String { + val tmp_1: CoroutineScope? = null + return returnExtensionValue(/* = */) +} + +@ObjCName(name = "returnFlowValue") +fun returnFlowValueNative(): Flow { + val tmp_2: CoroutineScope? = null + return returnFlowValue() +} + +@ObjCName(name = "returnGenericSuspendValue") +suspend fun returnGenericSuspendValueNative(value: T): T { + val tmp_3: CoroutineScope? = null + return returnGenericSuspendValue(value = value) +} + +@ObjCName(name = "returnInlineSuspendValue") +suspend inline fun returnInlineSuspendValueNative(value: T): T { + val tmp_4: CoroutineScope? = null + return returnInlineSuspendValue(value = value) +} + +@ObjCName(name = "returnNullableFlowAndValue") +fun returnNullableFlowAndValueNative(): Flow? { + val tmp_5: CoroutineScope? = null + return returnNullableFlowAndValue() +} + +@ObjCName(name = "returnNullableFlow") +fun returnNullableFlowNative(): Flow? { + val tmp_6: CoroutineScope? = null + return returnNullableFlow() +} + +@ObjCName(name = "returnNullableFlowValue") +fun returnNullableFlowValueNative(): Flow { + val tmp_7: CoroutineScope? = null + return returnNullableFlowValue() +} + +@ObjCName(name = "returnNullableSuspendFlow") +suspend fun returnNullableSuspendFlowNative(): Flow? { + val tmp_8: CoroutineScope? = null + return returnNullableSuspendFlow() +} + +@ObjCName(name = "returnNullableSuspendValue") +suspend fun returnNullableSuspendValueNative(): String? { + val tmp_9: CoroutineScope? = null + return returnNullableSuspendValue() +} + +@ObjCName(name = "returnRefinedSuspendValue") +@ShouldRefineInSwift +suspend fun returnRefinedSuspendValueNative(): String { + val tmp_10: CoroutineScope? = null + return returnRefinedSuspendValue() +} + +@ObjCName(name = "returnStateFlowValue") +fun returnStateFlowValueNative(): StateFlow { + val tmp_11: CoroutineScope? = null + return returnStateFlowValue() +} + +@ObjCName(name = "returnSuspendFlowValue") +@ShouldRefineInSwift +suspend fun returnSuspendFlowValueNative(): Flow { + val tmp_12: CoroutineScope? = null + return returnSuspendFlowValue() +} + +@ObjCName(name = "returnSuspendParameterValue") +suspend fun returnSuspendParameterValueNative(value: Int): Int { + val tmp_13: CoroutineScope? = null + return returnSuspendParameterValue(value = value) +} + +@ObjCName(name = "returnSuspendParameterValue") +suspend fun returnSuspendParameterValueNative(value: String): String { + val tmp_14: CoroutineScope? = null + return returnSuspendParameterValue(value = value) +} + +@ObjCName(name = "returnSuspendValue") +suspend fun returnSuspendValueNative(): String { + val tmp_15: CoroutineScope? = null + return returnSuspendValue() +} + +@ObjCName(name = "returnSuspendVarargValue") +suspend fun returnSuspendVarargValueNative(vararg values: String): String { + val tmp_16: CoroutineScope? = null + return returnSuspendVarargValue(values = values) +} + +@ObjCName(name = "returnThrowsSuspendValue") +suspend fun returnThrowsSuspendValueNative(): String { + val tmp_17: CoroutineScope? = null + return returnThrowsSuspendValue() +} diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt new file mode 100644 index 00000000..c866853b --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt @@ -0,0 +1,319 @@ +FILE: functions.kt + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue(): R|kotlin/String| { + ^returnSuspendValue String(OK1) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnNullableSuspendValue(): R|kotlin/String?| { + ^returnNullableSuspendValue Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final fun returnFlowValue(): R|kotlinx/coroutines/flow/Flow| { + ^returnFlowValue R|kotlinx/coroutines/flow/flowOf|(String(OK3)) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final fun returnNullableFlowValue(): R|kotlinx/coroutines/flow/Flow| { + ^returnNullableFlowValue R|kotlinx/coroutines/flow/flowOf|(Null(null)) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final fun returnNullableFlow(): R|kotlinx/coroutines/flow/Flow?| { + ^returnNullableFlow Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final fun returnNullableFlowAndValue(): R|kotlinx/coroutines/flow/Flow?| { + ^returnNullableFlowAndValue Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final fun returnStateFlowValue(): R|kotlinx/coroutines/flow/StateFlow| { + ^returnStateFlowValue R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK7)) + } + public final class MyClass8 : R|kotlin/Any| { + public constructor(): R|MyClass8| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue(): R|kotlin/String| { + ^returnSuspendValue String(OK8) + } + + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + ::R|/MyClass8.returnSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendParameterValue(value: R|kotlin/String|): R|kotlin/String| { + ^returnSuspendParameterValue R|/value| + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendParameterValue(value: R|kotlin/Int|): R|kotlin/Int| { + ^returnSuspendParameterValue R|/value| + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnThrowsSuspendValue(): R|kotlin/String| { + ^returnThrowsSuspendValue String(OK10) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendVarargValue(vararg values: R|kotlin/Array|): R|kotlin/String| { + ^returnSuspendVarargValue R|/values|.R|SubstitutionOverride|(Int(0)) + } + public final class MyClass14 : R|kotlin/Any| { + public constructor(value: R|T|): R|MyClass14| { + super() + } + + private final val value: R|T| = R|/value| + private get(): R|T| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnGenericSuspendValue(): R|T| { + ^returnGenericSuspendValue this@R|/MyClass14|.R|/MyClass14.value| + } + + @R|kotlin/native/ObjCName|(name = String(returnGenericSuspendValue)) public final suspend fun returnGenericSuspendValueNative(): R|T| { + ::R|/MyClass14.returnGenericSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesRefined|() public final suspend fun returnRefinedSuspendValue(): R|kotlin/String| { + ^returnRefinedSuspendValue String(OK13) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesRefined|() public final suspend fun returnSuspendFlowValue(): R|kotlinx/coroutines/flow/Flow| { + ^returnSuspendFlowValue R|kotlinx/coroutines/flow/flowOf|(String(OK14)) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnGenericSuspendValue(value: R|T|): R|T| { + ^returnGenericSuspendValue R|/value| + } + public final class MyClass16 : R|kotlin/Any| { + public constructor(): R|MyClass16| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun functionWithGenericValues(value1: R|T1|, value2: R|T2|): R|kotlin/String| { + ^functionWithGenericValues R|/value1|.R|kotlin/toString|().R|kotlin/String.plus|(R|/value2|.R|kotlin/toString|()) + } + + @R|kotlin/native/ObjCName|(name = String(functionWithGenericValues)) public final suspend fun functionWithGenericValuesNative(value1: R|T1|, value2: R|T2|): R|kotlin/String| { + ::R|/MyClass16.functionWithGenericValues| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final inline suspend fun returnInlineSuspendValue(value: R|T|): R|T| { + ^returnInlineSuspendValue R|/value| + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnNullableSuspendFlow(): R|kotlinx/coroutines/flow/Flow?| { + ^returnNullableSuspendFlow Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|kotlin/String|.returnExtensionValue(): R|kotlin/String| { + ^returnExtensionValue this@R|/returnExtensionValue| + } + public final class MyClass20 : R|kotlin/Any| { + public constructor(): R|MyClass20| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|kotlin/String|.returnClassExtensionValue(): R|kotlin/String| { + ^returnClassExtensionValue this@R|/MyClass20.returnClassExtensionValue| + } + + @R|kotlin/native/ObjCName|(name = String(returnClassExtensionValue)) public final suspend fun R|kotlin/String|.returnClassExtensionValueNative(): R|kotlin/String| { + ::R|/MyClass20.returnClassExtensionValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public final class MyClass21 : R|kotlin/Any| { + public constructor(): R|MyClass21| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnGenericValue(): R|T?| { + ^returnGenericValue Null(null) + } + + @R|kotlin/native/ObjCName|(name = String(returnGenericValue)) public final suspend fun returnGenericValueNative(): R|T?| { + ::R|/MyClass21.returnGenericValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public abstract interface MyInterface22 : R|kotlin/Any| { + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public abstract suspend fun returnInterfaceSuspendValue(): R|kotlin/String| + + @R|kotlin/native/ObjCName|(name = String(returnInterfaceSuspendValue)) public open suspend fun returnInterfaceSuspendValueNative(): R|kotlin/String| { + ::R|/MyInterface22.returnInterfaceSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public final class MyClass22 : R|MyInterface22| { + public constructor(): R|MyClass22| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public open override suspend fun returnInterfaceSuspendValue(): R|kotlin/String| { + ^returnInterfaceSuspendValue String(OK22) + } + + } + public final class MyFlow23 : R|kotlinx/coroutines/flow/Flow| { + public constructor(value1: R|T1|, value2: R|T2|): R|MyFlow23| { + super() + } + + private final field $$delegate_0: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(R|/value2|) + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final fun returnCustomFlowValue(): R|MyFlow23| { + ^returnCustomFlowValue R|/MyFlow23.MyFlow23|(Int(23), String(OK23)) + } + public final fun box(): R|kotlin/String| { + ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String?| { + ^ R|/returnNullableSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnFlowValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnNullableFlowValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/returnNullableFlowNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/returnNullableFlowAndValueNative|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnStateFlowValueNative|(), Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass8.MyClass8|().R|/MyClass8.returnSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnSuspendParameterValueNative|(String(OK9)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/Int| { + ^ R|/returnSuspendParameterValueNative|(Int(9)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnThrowsSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnSuspendVarargValueNative|(vararg(String(OK11))) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass14.MyClass14|(String(OK12)).R|SubstitutionOverride|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnRefinedSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.awaitAndCollect|( = awaitAndCollect@fun (): R|kotlinx/coroutines/flow/Flow| { + ^ R|/returnSuspendFlowValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnGenericSuspendValueNative|(String(OK15)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass16.MyClass16|().R|/MyClass16.functionWithGenericValuesNative|(String(OK), String(16)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/returnInlineSuspendValueNative|(String(OK17)) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.awaitAndCollectNull|( = awaitAndCollectNull@fun (): R|kotlinx/coroutines/flow/Flow?| { + ^ R|/returnNullableSuspendFlowNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ String(OK19).R|/returnExtensionValueNative|() + } + ) + R|kotlin/with|(R|/MyClass20.MyClass20|(), = with@fun R|MyClass20|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ (this@R|special/anonymous|, String(OK20)).R|/MyClass20.returnClassExtensionValueNative|() + } + ) + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String?| { + ^ R|/MyClass21.MyClass21|().R|SubstitutionOverride|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyClass22.MyClass22|().R|/MyInterface22.returnInterfaceSuspendValueNative|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/returnCustomFlowValueNative|()) + } + ) + } +FILE: __GENERATED DECLARATIONS__.kt + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + ::R|/returnSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnNullableSuspendValue)) public final suspend fun returnNullableSuspendValueNative(): R|kotlin/String?| { + ::R|/returnNullableSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnFlowValue)) public final fun returnFlowValueNative(): R|kotlinx/coroutines/flow/Flow| { + ::R|/returnFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnNullableFlowValue)) public final fun returnNullableFlowValueNative(): R|kotlinx/coroutines/flow/Flow| { + ::R|/returnNullableFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnNullableFlow)) public final fun returnNullableFlowNative(): R|kotlinx/coroutines/flow/Flow?| { + ::R|/returnNullableFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnNullableFlowAndValue)) public final fun returnNullableFlowAndValueNative(): R|kotlinx/coroutines/flow/Flow?| { + ::R|/returnNullableFlowAndValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnStateFlowValue)) public final fun returnStateFlowValueNative(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/returnStateFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnSuspendParameterValue)) public final suspend fun returnSuspendParameterValueNative(value: R|kotlin/String|): R|kotlin/String| { + ::R|/returnSuspendParameterValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnSuspendParameterValue)) public final suspend fun returnSuspendParameterValueNative(value: R|kotlin/Int|): R|kotlin/Int| { + ::R|/returnSuspendParameterValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnThrowsSuspendValue)) public final suspend fun returnThrowsSuspendValueNative(): R|kotlin/String| { + ::R|/returnThrowsSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnSuspendVarargValue)) public final suspend fun returnSuspendVarargValueNative(vararg values: R|kotlin/Array|): R|kotlin/String| { + ::R|/returnSuspendVarargValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnGenericSuspendValue)) public final suspend fun returnGenericSuspendValueNative(value: R|T|): R|T| { + ::R|/returnGenericSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnInlineSuspendValue)) public final inline suspend fun returnInlineSuspendValueNative(value: R|T|): R|T| { + ::R|/returnInlineSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnNullableSuspendFlow)) public final suspend fun returnNullableSuspendFlowNative(): R|kotlinx/coroutines/flow/Flow?| { + ::R|/returnNullableSuspendFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnExtensionValue)) public final suspend fun R|kotlin/String|.returnExtensionValueNative(): R|kotlin/String| { + ::R|/returnExtensionValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnCustomFlowValue)) public final fun returnCustomFlowValueNative(): R|MyFlow23| { + ::R|/returnCustomFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnRefinedSuspendValue)) @R|kotlin/native/ShouldRefineInSwift|() public final suspend fun returnRefinedSuspendValueNative(): R|kotlin/String| { + ::R|/returnRefinedSuspendValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnSuspendFlowValue)) @R|kotlin/native/ShouldRefineInSwift|() public final suspend fun returnSuspendFlowValueNative(): R|kotlinx/coroutines/flow/Flow| { + ::R|/returnSuspendFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.kt new file mode 120000 index 00000000..192f095a --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.kt @@ -0,0 +1 @@ +../functions.kt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.box.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.box.txt new file mode 120000 index 00000000..dd8ca159 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.box.txt @@ -0,0 +1 @@ +../properties.box.txt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.ir.txt new file mode 100644 index 00000000..c7565294 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.ir.txt @@ -0,0 +1,1450 @@ +FILE fqName: fileName:/properties.kt + PROPERTY name:topLevelFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:topLevelFlow type:kotlinx.coroutines.flow.Flow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK1" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY name:topLevelFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:topLevelFlow type:kotlinx.coroutines.flow.Flow visibility:private [final,static]' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY name:topLevelSharedFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:topLevelSharedFlow type:kotlinx.coroutines.flow.SharedFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun apply (: T of kotlin.apply, block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.apply declared in kotlin' type=kotlinx.coroutines.flow.MutableSharedFlow origin=null + TYPE_ARG T: kotlinx.coroutines.flow.MutableSharedFlow + ARG : CALL 'public final fun MutableSharedFlow (replay: kotlin.Int, extraBufferCapacity: kotlin.Int, onBufferOverflow: kotlinx.coroutines.channels.BufferOverflow): kotlinx.coroutines.flow.MutableSharedFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableSharedFlow origin=null + TYPE_ARG T: kotlin.String + ARG replay: CONST Int type=kotlin.Int value=1 + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$apply index:0 type:kotlinx.coroutines.flow.MutableSharedFlow + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public abstract fun tryEmit (value: T of kotlinx.coroutines.flow.MutableSharedFlow): kotlin.Boolean declared in kotlinx.coroutines.flow.MutableSharedFlow' type=kotlin.Boolean origin=null + ARG : GET_VAR '$this$apply: kotlinx.coroutines.flow.MutableSharedFlow declared in .topLevelSharedFlow.' type=kotlinx.coroutines.flow.MutableSharedFlow origin=IMPLICIT_ARGUMENT + ARG value: CONST String type=kotlin.String value="OK2" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow + correspondingProperty: PROPERTY name:topLevelSharedFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:topLevelSharedFlow type:kotlinx.coroutines.flow.SharedFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.SharedFlow origin=null + PROPERTY name:topLevelStateFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:topLevelStateFlow type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK3" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY name:topLevelStateFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:topLevelStateFlow type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY name:topLevelMutableStateFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:topLevelMutableStateFlow type:kotlinx.coroutines.flow.MutableStateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK4" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow + correspondingProperty: PROPERTY name:topLevelMutableStateFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:topLevelMutableStateFlow type:kotlinx.coroutines.flow.MutableStateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + PROPERTY name:nullableFlowValue visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:nullableFlowValue type:kotlinx.coroutines.flow.Flow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String? + ARG value: CONST Null type=kotlin.Nothing? value=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY name:nullableFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nullableFlowValue type:kotlinx.coroutines.flow.Flow visibility:private [final,static]' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY name:nullableSharedFlowValue visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:nullableSharedFlowValue type:kotlinx.coroutines.flow.SharedFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun apply (: T of kotlin.apply, block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.apply declared in kotlin' type=kotlinx.coroutines.flow.MutableSharedFlow origin=null + TYPE_ARG T: kotlinx.coroutines.flow.MutableSharedFlow + ARG : CALL 'public final fun MutableSharedFlow (replay: kotlin.Int, extraBufferCapacity: kotlin.Int, onBufferOverflow: kotlinx.coroutines.channels.BufferOverflow): kotlinx.coroutines.flow.MutableSharedFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableSharedFlow origin=null + TYPE_ARG T: kotlin.String? + ARG replay: CONST Int type=kotlin.Int value=1 + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$apply index:0 type:kotlinx.coroutines.flow.MutableSharedFlow + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public abstract fun tryEmit (value: T of kotlinx.coroutines.flow.MutableSharedFlow): kotlin.Boolean declared in kotlinx.coroutines.flow.MutableSharedFlow' type=kotlin.Boolean origin=null + ARG : GET_VAR '$this$apply: kotlinx.coroutines.flow.MutableSharedFlow declared in .nullableSharedFlowValue.' type=kotlinx.coroutines.flow.MutableSharedFlow origin=IMPLICIT_ARGUMENT + ARG value: CONST Null type=kotlin.Nothing? value=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow + correspondingProperty: PROPERTY name:nullableSharedFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nullableSharedFlowValue type:kotlinx.coroutines.flow.SharedFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.SharedFlow origin=null + PROPERTY name:nullableStateFlowValue visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:nullableStateFlowValue type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String? + ARG value: CONST Null type=kotlin.Nothing? value=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY name:nullableStateFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nullableStateFlowValue type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY name:stateProperty visibility:public modality:FINAL [val] + annotations: + NativeCoroutinesState + FIELD PROPERTY_BACKING_FIELD name:stateProperty type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK23" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY name:stateProperty visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stateProperty type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY name:mutableStateProperty visibility:public modality:FINAL [val] + annotations: + NativeCoroutinesState + FIELD PROPERTY_BACKING_FIELD name:mutableStateProperty type:kotlinx.coroutines.flow.MutableStateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK24" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow + correspondingProperty: PROPERTY name:mutableStateProperty visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:mutableStateProperty type:kotlinx.coroutines.flow.MutableStateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + PROPERTY name:refinedFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutinesRefined + FIELD PROPERTY_BACKING_FIELD name:refinedFlow type:kotlinx.coroutines.flow.Flow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK25" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY name:refinedFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:refinedFlow type:kotlinx.coroutines.flow.Flow visibility:private [final,static]' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY name:refinedState visibility:public modality:FINAL [val] + annotations: + NativeCoroutinesRefinedState + FIELD PROPERTY_BACKING_FIELD name:refinedState type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK26" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY name:refinedState visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:refinedState type:kotlinx.coroutines.flow.StateFlow visibility:private [final,static]' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY name:mutableNullableStateProperty visibility:public modality:FINAL [val] + annotations: + NativeCoroutinesState + FIELD PROPERTY_BACKING_FIELD name:mutableNullableStateProperty type:kotlinx.coroutines.flow.MutableStateFlow? visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK27" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow? + correspondingProperty: PROPERTY name:mutableNullableStateProperty visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow? declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:mutableNullableStateProperty type:kotlinx.coroutines.flow.MutableStateFlow? visibility:private [final,static]' type=kotlinx.coroutines.flow.MutableStateFlow? origin=null + CLASS CLASS name:MyClass28 modality:FINAL visibility:public superTypes:[.MyInterface28] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyClass28 + PROPERTY name:interfaceFlowValue visibility:public modality:OPEN [val] + annotations: + NativeCoroutines + overridden: + public abstract interfaceFlowValue: kotlinx.coroutines.flow.Flow declared in .MyInterface28 + FIELD PROPERTY_BACKING_FIELD name:interfaceFlowValue type:kotlinx.coroutines.flow.Flow visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK28" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass28 + correspondingProperty: PROPERTY name:interfaceFlowValue visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlinx.coroutines.flow.Flow declared in .MyInterface28 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlinx.coroutines.flow.Flow declared in .MyClass28' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:interfaceFlowValue type:kotlinx.coroutines.flow.Flow visibility:private [final]' type=kotlinx.coroutines.flow.Flow origin=null + receiver: GET_VAR ': .MyClass28 declared in .MyClass28.' type=.MyClass28 origin=null + CONSTRUCTOR visibility:public returnType:.MyClass28 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass28 modality:FINAL visibility:public superTypes:[.MyInterface28]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyInterface28 + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in .MyInterface28 + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in .MyInterface28 + PROPERTY FAKE_OVERRIDE name:interfaceFlowValueNative visibility:public modality:OPEN [fake_override,val] + annotations: + ObjCName(name = "interfaceFlowValue", swiftName = , exact = ) + overridden: + public open interfaceFlowValueNative: kotlinx.coroutines.flow.Flow declared in .MyInterface28 + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN returnType:kotlinx.coroutines.flow.Flow [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface28 + correspondingProperty: PROPERTY FAKE_OVERRIDE name:interfaceFlowValueNative visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlinx.coroutines.flow.Flow declared in .MyInterface28 + CLASS CLASS name:MyFlow29 modality:FINAL visibility:public superTypes:[kotlinx.coroutines.flow.Flow.MyFlow29?>] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyFlow29.MyFlow29, T2 of .MyFlow29> + TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:T2 index:1 variance: superTypes:[kotlin.Any?] reified:false + FIELD DELEGATE name:$$delegate_0 type:kotlinx.coroutines.flow.Flow.MyFlow29?> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow.MyFlow29?> origin=null + TYPE_ARG T: T2 of .MyFlow29? + ARG value: CONST Null type=kotlin.Nothing? value=null + CONSTRUCTOR visibility:public returnType:.MyFlow29.MyFlow29, T2 of .MyFlow29> [primary] + VALUE_PARAMETER kind:Regular name:value1 index:0 type:T1 of .MyFlow29 + VALUE_PARAMETER kind:Regular name:value2 index:1 type:T2 of .MyFlow29 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyFlow29 modality:FINAL visibility:public superTypes:[kotlinx.coroutines.flow.Flow.MyFlow29?>]' type=kotlin.Unit + FUN DELEGATED_MEMBER name:collect visibility:public modality:OPEN returnType:kotlin.Unit [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyFlow29.MyFlow29, T2 of .MyFlow29> + VALUE_PARAMETER kind:Regular name:collector index:1 type:kotlinx.coroutines.flow.FlowCollector.MyFlow29?> + overridden: + public abstract fun collect (collector: kotlinx.coroutines.flow.FlowCollector): kotlin.Unit declared in kotlinx.coroutines.flow.Flow + BLOCK_BODY + CALL 'public abstract fun collect (collector: kotlinx.coroutines.flow.FlowCollector): kotlin.Unit declared in kotlinx.coroutines.flow.Flow' type=kotlin.Unit origin=null + ARG : GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:kotlinx.coroutines.flow.Flow.MyFlow29?> visibility:private [final] declared in .MyFlow29' type=kotlinx.coroutines.flow.Flow.MyFlow29?> origin=null + receiver: GET_VAR ': .MyFlow29.MyFlow29, T2 of .MyFlow29> declared in .MyFlow29.collect' type=.MyFlow29.MyFlow29, T2 of .MyFlow29> origin=null + ARG collector: GET_VAR 'collector: kotlinx.coroutines.flow.FlowCollector.MyFlow29?> declared in .MyFlow29.collect' type=kotlinx.coroutines.flow.FlowCollector.MyFlow29?> origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlinx.coroutines.flow.Flow + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlinx.coroutines.flow.Flow + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlinx.coroutines.flow.Flow + CLASS CLASS name:MyGenericClass1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyGenericClass1.MyGenericClass1> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + PROPERTY name:value visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final] + EXPRESSION_BODY + GET_VAR 'value: T of .MyGenericClass1 declared in .MyGenericClass1.' type=T of .MyGenericClass1 origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:T of .MyGenericClass1 + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass1.MyGenericClass1> + correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): T of .MyGenericClass1 declared in .MyGenericClass1' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.' type=.MyGenericClass1.MyGenericClass1> origin=null + CONSTRUCTOR visibility:public returnType:.MyGenericClass1.MyGenericClass1> [primary] + VALUE_PARAMETER kind:Regular name:value index:0 type:T of .MyGenericClass1 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyGenericClass1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' type=kotlin.Unit + FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL returnType:T of .MyGenericClass1 [operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass1.MyGenericClass1> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun component1 (): T of .MyGenericClass1 declared in .MyGenericClass1' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.component1' type=.MyGenericClass1.MyGenericClass1> origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL returnType:.MyGenericClass1.MyGenericClass1> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass1.MyGenericClass1> + VALUE_PARAMETER kind:Regular name:value index:1 type:T of .MyGenericClass1 + EXPRESSION_BODY + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.copy' type=.MyGenericClass1.MyGenericClass1> origin=null + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun copy (value: T of .MyGenericClass1): .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1' + CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass1) declared in .MyGenericClass1' type=.MyGenericClass1.MyGenericClass1> origin=null + TYPE_ARG (of class) T: T of .MyGenericClass1 + ARG value: GET_VAR 'value: T of .MyGenericClass1 declared in .MyGenericClass1.copy' type=T of .MyGenericClass1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass1.MyGenericClass1> + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + BLOCK_BODY + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ + ARG arg0: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.equals' type=.MyGenericClass1.MyGenericClass1> origin=null + ARG arg1: GET_VAR 'other: kotlin.Any? declared in .MyGenericClass1.equals' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyGenericClass1' + CONST Boolean type=kotlin.Boolean value=true + WHEN type=kotlin.Unit origin=null + BRANCH + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.MyGenericClass1.MyGenericClass1> + GET_VAR 'other: kotlin.Any? declared in .MyGenericClass1.equals' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyGenericClass1' + CONST Boolean type=kotlin.Boolean value=false + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.MyGenericClass1.MyGenericClass1> [val] + TYPE_OP type=.MyGenericClass1.MyGenericClass1> origin=IMPLICIT_CAST typeOperand=.MyGenericClass1.MyGenericClass1> + GET_VAR 'other: kotlin.Any? declared in .MyGenericClass1.equals' type=kotlin.Any? origin=null + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ + ARG : CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ + ARG arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.equals' type=.MyGenericClass1.MyGenericClass1> origin=null + ARG arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR 'val tmp_0: .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.equals' type=.MyGenericClass1.MyGenericClass1> origin=null + then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyGenericClass1' + CONST Boolean type=kotlin.Boolean value=false + RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyGenericClass1' + CONST Boolean type=kotlin.Boolean value=true + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN returnType:kotlin.Int + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass1.MyGenericClass1> + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .MyGenericClass1' + WHEN type=kotlin.Int origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + ARG arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.hashCode' type=.MyGenericClass1.MyGenericClass1> origin=null + ARG arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Int type=kotlin.Int value=0 + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + ARG : GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.hashCode' type=.MyGenericClass1.MyGenericClass1> origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN returnType:kotlin.String + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass1.MyGenericClass1> + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .MyGenericClass1' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="MyGenericClass1(" + CONST String type=kotlin.String value="value=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass1 visibility:private [final]' type=T of .MyGenericClass1 origin=null + receiver: GET_VAR ': .MyGenericClass1.MyGenericClass1> declared in .MyGenericClass1.toString' type=.MyGenericClass1.MyGenericClass1> origin=null + CONST String type=kotlin.String value=")" + CLASS CLASS name:MyGenericClass2 modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyGenericClass2.MyGenericClass2> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + PROPERTY name:value visibility:private modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass2 visibility:private [final] + EXPRESSION_BODY + GET_VAR 'value: T of .MyGenericClass2 declared in .MyGenericClass2.' type=T of .MyGenericClass2 origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL returnType:T of .MyGenericClass2 + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY name:value visibility:private modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): T of .MyGenericClass2 declared in .MyGenericClass2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .MyGenericClass2 visibility:private [final]' type=T of .MyGenericClass2 origin=null + receiver: GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + PROPERTY name:genericFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:genericFlow type:kotlinx.coroutines.flow.Flow.MyGenericClass2> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow.MyGenericClass2> origin=null + TYPE_ARG T: T of .MyGenericClass2 + ARG value: CALL 'private final fun (): T of .MyGenericClass2 declared in .MyGenericClass2' type=T of .MyGenericClass2 origin=GET_PROPERTY + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2' type=.MyGenericClass2.MyGenericClass2> origin=IMPLICIT_ARGUMENT + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow.MyGenericClass2> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY name:genericFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow.MyGenericClass2> declared in .MyGenericClass2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericFlow type:kotlinx.coroutines.flow.Flow.MyGenericClass2> visibility:private [final]' type=kotlinx.coroutines.flow.Flow.MyGenericClass2> origin=null + receiver: GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + PROPERTY name:genericSharedFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:genericSharedFlow type:kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun apply (: T of kotlin.apply, block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.apply declared in kotlin' type=kotlinx.coroutines.flow.MutableSharedFlow.MyGenericClass2> origin=null + TYPE_ARG T: kotlinx.coroutines.flow.MutableSharedFlow.MyGenericClass2> + ARG : CALL 'public final fun MutableSharedFlow (replay: kotlin.Int, extraBufferCapacity: kotlin.Int, onBufferOverflow: kotlinx.coroutines.channels.BufferOverflow): kotlinx.coroutines.flow.MutableSharedFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableSharedFlow.MyGenericClass2> origin=null + TYPE_ARG T: T of .MyGenericClass2 + ARG replay: CONST Int type=kotlin.Int value=1 + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1.MyGenericClass2>, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$apply index:0 type:kotlinx.coroutines.flow.MutableSharedFlow.MyGenericClass2> + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public abstract fun tryEmit (value: T of kotlinx.coroutines.flow.MutableSharedFlow): kotlin.Boolean declared in kotlinx.coroutines.flow.MutableSharedFlow' type=kotlin.Boolean origin=null + ARG : GET_VAR '$this$apply: kotlinx.coroutines.flow.MutableSharedFlow.MyGenericClass2> declared in .MyGenericClass2.genericSharedFlow.' type=kotlinx.coroutines.flow.MutableSharedFlow.MyGenericClass2> origin=IMPLICIT_ARGUMENT + ARG value: CALL 'private final fun (): T of .MyGenericClass2 declared in .MyGenericClass2' type=T of .MyGenericClass2 origin=GET_PROPERTY + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2' type=.MyGenericClass2.MyGenericClass2> origin=IMPLICIT_ARGUMENT + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY name:genericSharedFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> declared in .MyGenericClass2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericSharedFlow type:kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> visibility:private [final]' type=kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> origin=null + receiver: GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + PROPERTY name:genericStateFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FIELD PROPERTY_BACKING_FIELD name:genericStateFlow type:kotlinx.coroutines.flow.StateFlow.MyGenericClass2> visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow.MyGenericClass2> origin=null + TYPE_ARG T: T of .MyGenericClass2 + ARG value: CALL 'private final fun (): T of .MyGenericClass2 declared in .MyGenericClass2' type=T of .MyGenericClass2 origin=GET_PROPERTY + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2' type=.MyGenericClass2.MyGenericClass2> origin=IMPLICIT_ARGUMENT + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow.MyGenericClass2> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY name:genericStateFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow.MyGenericClass2> declared in .MyGenericClass2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericStateFlow type:kotlinx.coroutines.flow.StateFlow.MyGenericClass2> visibility:private [final]' type=kotlinx.coroutines.flow.StateFlow.MyGenericClass2> origin=null + receiver: GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + CONSTRUCTOR visibility:public returnType:.MyGenericClass2.MyGenericClass2> [primary] + VALUE_PARAMETER kind:Regular name:value index:0 type:T of .MyGenericClass2 + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyGenericClass2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "genericFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow.MyGenericClass2> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow.MyGenericClass2> declared in .MyGenericClass2' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.Flow.MyGenericClass2> origin=null + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "genericSharedFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> declared in .MyGenericClass2' + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> origin=null + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowReplayCache visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.collections.List.MyGenericClass2> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowReplayCache visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> [val] + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> origin=null + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.List.MyGenericClass2> declared in .MyGenericClass2' + CALL 'public abstract fun (): kotlin.collections.List declared in kotlinx.coroutines.flow.SharedFlow' type=T of .MyGenericClass2 origin=null + ARG : GET_VAR 'val tmp_3: kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> declared in .MyGenericClass2.' type=kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "genericStateFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow.MyGenericClass2> + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow.MyGenericClass2> declared in .MyGenericClass2' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.StateFlow.MyGenericClass2> origin=null + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowValue visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:T of .MyGenericClass2 + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyGenericClass2.MyGenericClass2> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlinx.coroutines.flow.StateFlow.MyGenericClass2> [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.StateFlow.MyGenericClass2> origin=null + ARG : GET_VAR ': .MyGenericClass2.MyGenericClass2> declared in .MyGenericClass2.' type=.MyGenericClass2.MyGenericClass2> origin=null + RETURN type=kotlin.Nothing from='public final fun (): T of .MyGenericClass2 declared in .MyGenericClass2' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=T of .MyGenericClass2 origin=null + ARG : GET_VAR 'val tmp_5: kotlinx.coroutines.flow.StateFlow.MyGenericClass2> declared in .MyGenericClass2.' type=kotlinx.coroutines.flow.StateFlow.MyGenericClass2> origin=null + CLASS INTERFACE name:MyInterface28 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyInterface28 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:interfaceFlowValueNative visibility:public modality:OPEN [val] + annotations: + ObjCName(name = "interfaceFlowValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:OPEN returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface28 + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:interfaceFlowValueNative visibility:public modality:OPEN [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public open fun (): kotlinx.coroutines.flow.Flow declared in .MyInterface28' + CALL 'public abstract fun (): kotlinx.coroutines.flow.Flow declared in .MyInterface28' type=kotlinx.coroutines.flow.Flow origin=null + ARG : GET_VAR ': .MyInterface28 declared in .MyInterface28.' type=.MyInterface28 origin=null + PROPERTY name:interfaceFlowValue visibility:public modality:ABSTRACT [val] + annotations: + NativeCoroutines + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface28 + correspondingProperty: PROPERTY name:interfaceFlowValue visibility:public modality:ABSTRACT [val] + FUN name:box visibility:public modality:FINAL returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CALL 'public final fun runBoxTest (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.String declared in com.rickclephas.kmp.nativecoroutines' type=kotlin.String origin=null + ARG action: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest + BLOCK_BODY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun values (values: kotlin.collections.List): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG values: CALL 'public final fun (): kotlin.collections.List declared in ' type=kotlin.collections.List origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun values (values: kotlin.collections.List): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG values: CALL 'public final fun (): kotlin.collections.List declared in ' type=kotlin.collections.List origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String? declared in ' type=kotlin.String? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.Flow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.SharedFlow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' type=kotlinx.coroutines.flow.SharedFlow? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.collections.List? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.collections.List? declared in ' type=kotlin.collections.List? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.StateFlow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' type=kotlinx.coroutines.flow.StateFlow? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String? declared in ' type=kotlin.String? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.Flow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.SharedFlow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' type=kotlinx.coroutines.flow.SharedFlow? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.collections.List? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.collections.List? declared in ' type=kotlin.collections.List? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlinx.coroutines.flow.StateFlow? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' type=kotlinx.coroutines.flow.StateFlow? origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String? declared in ' type=kotlin.String? origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.Flow.> declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + TYPE_ARG T: kotlin.String + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass1) declared in .MyGenericClass1' type=.MyGenericClass1 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK14" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.SharedFlow.> declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=GET_PROPERTY + TYPE_ARG T: kotlin.String + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass1) declared in .MyGenericClass1' type=.MyGenericClass1 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK15" + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun values (values: kotlin.collections.List): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG values: CALL 'public final fun (: .MyGenericClass1.>): kotlin.collections.List.> declared in ' type=kotlin.collections.List origin=GET_PROPERTY + TYPE_ARG T: kotlin.String + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass1) declared in .MyGenericClass1' type=.MyGenericClass1 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK15" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.StateFlow.> declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + TYPE_ARG T: kotlin.String + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass1) declared in .MyGenericClass1' type=.MyGenericClass1 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK16" + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (: .MyGenericClass1.>): T of . declared in ' type=kotlin.String origin=GET_PROPERTY + TYPE_ARG T: kotlin.String + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass1) declared in .MyGenericClass1' type=.MyGenericClass1 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK16" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass2) declared in .MyGenericClass2' type=.MyGenericClass2 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK17" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.SharedFlow origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass2) declared in .MyGenericClass2' type=.MyGenericClass2 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK18" + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun values (values: kotlin.collections.List): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG values: CALL 'public final fun (): kotlin.collections.List.MyGenericClass2> declared in .MyGenericClass2' type=kotlin.collections.List origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass2) declared in .MyGenericClass2' type=.MyGenericClass2 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK18" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow.MyGenericClass2> declared in .MyGenericClass2' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass2) declared in .MyGenericClass2' type=.MyGenericClass2 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK19" + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): T of .MyGenericClass2 declared in .MyGenericClass2' type=kotlin.String origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor (value: T of .MyGenericClass2) declared in .MyGenericClass2' type=.MyGenericClass2 origin=null + TYPE_ARG (of class) T: kotlin.String + ARG value: CONST String type=kotlin.String value="OK19" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + ARG : CONST String type=kotlin.String value="OK20" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=GET_PROPERTY + ARG : CONST String type=kotlin.String value="OK21" + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun values (values: kotlin.collections.List): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG values: CALL 'public final fun (: kotlin.String): kotlin.collections.List declared in ' type=kotlin.collections.List origin=GET_PROPERTY + ARG : CONST String type=kotlin.String value="OK21" + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG : CONST String type=kotlin.String value="OK22" + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + ARG : CONST String type=kotlin.String value="OK22" + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun value (value: T of com.rickclephas.kmp.nativecoroutines.BoxTest.value): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): kotlin.String? declared in ' type=kotlin.String? origin=GET_PROPERTY + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlinx.coroutines.flow.MutableStateFlow origin=EXCLEXCL + TYPE_ARG T0: kotlinx.coroutines.flow.MutableStateFlow + ARG arg0: CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow? declared in ' type=kotlinx.coroutines.flow.MutableStateFlow? origin=GET_PROPERTY + ARG maxValues: CONST Int type=kotlin.Int value=1 + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public open fun (): kotlinx.coroutines.flow.Flow declared in .MyClass28' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyClass28' type=.MyClass28 origin=null + CALL 'public final fun collect (flow: kotlinx.coroutines.flow.Flow, maxValues: kotlin.Int?): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String? + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG flow: CALL 'public final fun (): .MyFlow29 declared in ' type=.MyFlow29 origin=GET_PROPERTY + PROPERTY name:customFlowValue visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:.MyFlow29 + correspondingProperty: PROPERTY name:customFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .MyFlow29 declared in ' + CONSTRUCTOR_CALL 'public constructor (value1: T1 of .MyFlow29, value2: T2 of .MyFlow29) declared in .MyFlow29' type=.MyFlow29 origin=null + TYPE_ARG (of class) T1: kotlin.Int + TYPE_ARG (of class) T2: kotlin.String + ARG value1: CONST Int type=kotlin.Int value=29 + ARG value2: CONST String type=kotlin.String value="OK29" + PROPERTY name:extensionFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY name:extensionFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow origin=null + TYPE_ARG T: kotlin.String + ARG value: GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY name:extensionSharedFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY name:extensionSharedFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlinx.coroutines.flow.SharedFlow declared in ' + CALL 'public final fun apply (: T of kotlin.apply, block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.apply declared in kotlin' type=kotlinx.coroutines.flow.MutableSharedFlow origin=null + TYPE_ARG T: kotlinx.coroutines.flow.MutableSharedFlow + ARG : CALL 'public final fun MutableSharedFlow (replay: kotlin.Int, extraBufferCapacity: kotlin.Int, onBufferOverflow: kotlinx.coroutines.channels.BufferOverflow): kotlinx.coroutines.flow.MutableSharedFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableSharedFlow origin=null + TYPE_ARG T: kotlin.String + ARG replay: CONST Int type=kotlin.Int value=1 + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$apply index:0 type:kotlinx.coroutines.flow.MutableSharedFlow + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public abstract fun tryEmit (value: T of kotlinx.coroutines.flow.MutableSharedFlow): kotlin.Boolean declared in kotlinx.coroutines.flow.MutableSharedFlow' type=kotlin.Boolean origin=null + ARG : GET_VAR '$this$apply: kotlinx.coroutines.flow.MutableSharedFlow declared in ..' type=kotlinx.coroutines.flow.MutableSharedFlow origin=IMPLICIT_ARGUMENT + ARG value: GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY name:extensionStateFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY name:extensionStateFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + TYPE_ARG T: kotlin.String + ARG value: GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY name:genericFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow.> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY name:genericFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.Flow.> declared in ' + CALL 'public final fun flowOf (value: T of kotlinx.coroutines.flow.flowOf): kotlinx.coroutines.flow.Flow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.Flow.> origin=null + TYPE_ARG T: T of . + ARG value: CALL 'public final fun (): T of .MyGenericClass1 declared in .MyGenericClass1' type=T of . origin=GET_PROPERTY + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=IMPLICIT_ARGUMENT + PROPERTY name:genericSharedFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow.> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY name:genericSharedFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.SharedFlow.> declared in ' + CALL 'public final fun apply (: T of kotlin.apply, block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.apply declared in kotlin' type=kotlinx.coroutines.flow.MutableSharedFlow.> origin=null + TYPE_ARG T: kotlinx.coroutines.flow.MutableSharedFlow.> + ARG : CALL 'public final fun MutableSharedFlow (replay: kotlin.Int, extraBufferCapacity: kotlin.Int, onBufferOverflow: kotlinx.coroutines.channels.BufferOverflow): kotlinx.coroutines.flow.MutableSharedFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableSharedFlow.> origin=null + TYPE_ARG T: T of . + ARG replay: CONST Int type=kotlin.Int value=1 + ARG block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1.>, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER kind:ExtensionReceiver name:$this$apply index:0 type:kotlinx.coroutines.flow.MutableSharedFlow.> + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public abstract fun tryEmit (value: T of kotlinx.coroutines.flow.MutableSharedFlow): kotlin.Boolean declared in kotlinx.coroutines.flow.MutableSharedFlow' type=kotlin.Boolean origin=null + ARG : GET_VAR '$this$apply: kotlinx.coroutines.flow.MutableSharedFlow.> declared in ..' type=kotlinx.coroutines.flow.MutableSharedFlow.> origin=IMPLICIT_ARGUMENT + ARG value: CALL 'public final fun (): T of .MyGenericClass1 declared in .MyGenericClass1' type=T of . origin=GET_PROPERTY + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=IMPLICIT_ARGUMENT + PROPERTY name:genericStateFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow.> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY name:genericStateFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.StateFlow.> declared in ' + CALL 'public final fun MutableStateFlow (value: T of kotlinx.coroutines.flow.MutableStateFlow): kotlinx.coroutines.flow.MutableStateFlow declared in kotlinx.coroutines.flow' type=kotlinx.coroutines.flow.MutableStateFlow.> origin=null + TYPE_ARG T: T of . + ARG value: CALL 'public final fun (): T of .MyGenericClass1 declared in .MyGenericClass1' type=T of . origin=GET_PROPERTY + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=IMPLICIT_ARGUMENT + PROPERTY name:nullableFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + correspondingProperty: PROPERTY name:nullableFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow? declared in ' + CONST Null type=kotlin.Nothing? value=null + PROPERTY name:nullableFlowAndValue visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + correspondingProperty: PROPERTY name:nullableFlowAndValue visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow? declared in ' + CONST Null type=kotlin.Nothing? value=null + PROPERTY name:nullableSharedFlow visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow? + correspondingProperty: PROPERTY name:nullableSharedFlow visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' + CONST Null type=kotlin.Nothing? value=null + PROPERTY name:nullableSharedFlowAndValue visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow? + correspondingProperty: PROPERTY name:nullableSharedFlowAndValue visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' + CONST Null type=kotlin.Nothing? value=null + PROPERTY name:nullableStateFlowAndValue visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow? + correspondingProperty: PROPERTY name:nullableStateFlowAndValue visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' + CONST Null type=kotlin.Nothing? value=null + PROPERTY name:nullableStateFlowProperty visibility:public modality:FINAL [val] + annotations: + NativeCoroutines + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow? + correspondingProperty: PROPERTY name:nullableStateFlowProperty visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' + CONST Null type=kotlin.Nothing? value=null +FILE fqName: fileName:__GENERATED DECLARATIONS__.kt + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelMutableStateFlowValue visibility:public modality:FINAL [var] + FIELD PROPERTY_BACKING_FIELD name:topLevelMutableStateFlowValue type:kotlin.String visibility:private [static] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelMutableStateFlowValue visibility:public modality:FINAL [var] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.flow.MutableStateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_0: kotlinx.coroutines.flow.MutableStateFlow declared in .' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelMutableStateFlowValue visibility:public modality:FINAL [var] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (value: kotlin.String): kotlin.Unit declared in ' + CALL 'public abstract fun (: T of kotlinx.coroutines.flow.MutableStateFlow): kotlin.Unit declared in kotlinx.coroutines.flow.MutableStateFlow' type=kotlin.Unit origin=null + ARG : CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + ARG : GET_VAR 'value: kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableStatePropertyValue visibility:public modality:FINAL [var] + annotations: + ObjCName(name = "mutableStateProperty", swiftName = , exact = ) + FIELD PROPERTY_BACKING_FIELD name:mutableStatePropertyValue type:kotlin.String visibility:private [static] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableStatePropertyValue visibility:public modality:FINAL [var] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.flow.MutableStateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_1: kotlinx.coroutines.flow.MutableStateFlow declared in .' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.Unit + VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableStatePropertyValue visibility:public modality:FINAL [var] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (value: kotlin.String): kotlin.Unit declared in ' + CALL 'public abstract fun (: T of kotlinx.coroutines.flow.MutableStateFlow): kotlin.Unit declared in kotlinx.coroutines.flow.MutableStateFlow' type=kotlin.Unit origin=null + ARG : CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + ARG : GET_VAR 'value: kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:customFlowValueNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "customFlowValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:.MyFlow29 + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:customFlowValueNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): .MyFlow29 declared in ' + CALL 'public final fun (): .MyFlow29 declared in ' type=.MyFlow29 origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "extensionFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + ARG : GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionSharedFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "extensionSharedFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionSharedFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlinx.coroutines.flow.SharedFlow declared in ' + CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=null + ARG : GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionSharedFlowReplayCache visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.collections.List + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionSharedFlowReplayCache visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlinx.coroutines.flow.SharedFlow [val] + CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=null + ARG : GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlin.collections.List declared in ' + CALL 'public abstract fun (): kotlin.collections.List declared in kotlinx.coroutines.flow.SharedFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_5: kotlinx.coroutines.flow.SharedFlow declared in .' type=kotlinx.coroutines.flow.SharedFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionStateFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "extensionStateFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionStateFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + ARG : GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionStateFlowValue visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:extensionStateFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlinx.coroutines.flow.StateFlow [val] + CALL 'public final fun (: kotlin.String): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + ARG : GET_VAR ': kotlin.String declared in .' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='public final fun (: kotlin.String): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_7: kotlinx.coroutines.flow.StateFlow declared in .' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "genericFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow.> + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.Flow.> declared in ' + CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.Flow.> declared in ' type=kotlinx.coroutines.flow.Flow.> origin=null + TYPE_ARG T: T of . + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "genericSharedFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow.> + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.SharedFlow.> declared in ' + CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.SharedFlow.> declared in ' type=kotlinx.coroutines.flow.SharedFlow.> origin=null + TYPE_ARG T: T of . + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowReplayCache visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.collections.List.> + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericSharedFlowReplayCache visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlinx.coroutines.flow.SharedFlow.> [val] + CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.SharedFlow.> declared in ' type=kotlinx.coroutines.flow.SharedFlow.> origin=null + TYPE_ARG T: T of . + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=null + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): kotlin.collections.List.> declared in ' + CALL 'public abstract fun (): kotlin.collections.List declared in kotlinx.coroutines.flow.SharedFlow' type=T of . origin=null + ARG : GET_VAR 'val tmp_10: kotlinx.coroutines.flow.SharedFlow.> declared in .' type=kotlinx.coroutines.flow.SharedFlow.> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "genericStateFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow.> + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.StateFlow.> declared in ' + CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.StateFlow.> declared in ' type=kotlinx.coroutines.flow.StateFlow.> origin=null + TYPE_ARG T: T of . + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowValue visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:T of . + TYPE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyGenericClass1.> + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:genericStateFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlinx.coroutines.flow.StateFlow.> [val] + CALL 'public final fun (: .MyGenericClass1.>): kotlinx.coroutines.flow.StateFlow.> declared in ' type=kotlinx.coroutines.flow.StateFlow.> origin=null + TYPE_ARG T: T of . + ARG : GET_VAR ': .MyGenericClass1.> declared in .' type=.MyGenericClass1.> origin=null + RETURN type=kotlin.Nothing from='public final fun (: .MyGenericClass1.>): T of . declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=T of . origin=null + ARG : GET_VAR 'val tmp_12: kotlinx.coroutines.flow.StateFlow.> declared in .' type=kotlinx.coroutines.flow.StateFlow.> origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableNullableStatePropertyFlow visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableNullableStatePropertyFlow visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow? declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow? declared in ' type=kotlinx.coroutines.flow.MutableStateFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableNullableStatePropertyValue visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "mutableNullableStateProperty", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableNullableStatePropertyValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlinx.coroutines.flow.MutableStateFlow? [val] + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow? declared in ' type=kotlinx.coroutines.flow.MutableStateFlow? origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in ' + WHEN type=kotlin.String? origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + ARG arg0: GET_VAR 'val tmp_14: kotlinx.coroutines.flow.MutableStateFlow? declared in .' type=kotlinx.coroutines.flow.MutableStateFlow? origin=null + ARG arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Null type=kotlin.String? value=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_14: kotlinx.coroutines.flow.MutableStateFlow? declared in .' type=kotlinx.coroutines.flow.MutableStateFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableStatePropertyFlow visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:mutableStatePropertyFlow visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableFlowAndValueNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableFlowAndValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableFlowAndValueNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow? declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow? declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow? declared in ' type=kotlinx.coroutines.flow.Flow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableFlowValueNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableFlowValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableFlowValueNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_18 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowAndValueNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableSharedFlowAndValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowAndValueNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_19 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' type=kotlinx.coroutines.flow.SharedFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowAndValueReplayCache visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.collections.List? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowAndValueReplayCache visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_20 type:kotlinx.coroutines.flow.SharedFlow? [val] + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' type=kotlinx.coroutines.flow.SharedFlow? origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.List? declared in ' + WHEN type=kotlin.collections.List? origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + ARG arg0: GET_VAR 'val tmp_20: kotlinx.coroutines.flow.SharedFlow? declared in .' type=kotlinx.coroutines.flow.SharedFlow? origin=null + ARG arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Null type=kotlin.collections.List? value=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public abstract fun (): kotlin.collections.List declared in kotlinx.coroutines.flow.SharedFlow' type=kotlin.String? origin=null + ARG : GET_VAR 'val tmp_20: kotlinx.coroutines.flow.SharedFlow? declared in .' type=kotlinx.coroutines.flow.SharedFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableSharedFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_21 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' type=kotlinx.coroutines.flow.SharedFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowReplayCache visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.collections.List? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowReplayCache visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_22 type:kotlinx.coroutines.flow.SharedFlow? [val] + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow? declared in ' type=kotlinx.coroutines.flow.SharedFlow? origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.List? declared in ' + WHEN type=kotlin.collections.List? origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + ARG arg0: GET_VAR 'val tmp_22: kotlinx.coroutines.flow.SharedFlow? declared in .' type=kotlinx.coroutines.flow.SharedFlow? origin=null + ARG arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Null type=kotlin.collections.List? value=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public abstract fun (): kotlin.collections.List declared in kotlinx.coroutines.flow.SharedFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_22: kotlinx.coroutines.flow.SharedFlow? declared in .' type=kotlinx.coroutines.flow.SharedFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowValueNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableSharedFlowValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowValueNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_23 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowValueReplayCache visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.collections.List + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableSharedFlowValueReplayCache visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_24 type:kotlinx.coroutines.flow.SharedFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.List declared in ' + CALL 'public abstract fun (): kotlin.collections.List declared in kotlinx.coroutines.flow.SharedFlow' type=kotlin.String? origin=null + ARG : GET_VAR 'val tmp_24: kotlinx.coroutines.flow.SharedFlow declared in .' type=kotlinx.coroutines.flow.SharedFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowAndValueNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableStateFlowAndValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowAndValueNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_25 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' type=kotlinx.coroutines.flow.StateFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowAndValueValue visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowAndValueValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_26 type:kotlinx.coroutines.flow.StateFlow? [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' type=kotlinx.coroutines.flow.StateFlow? origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in ' + WHEN type=kotlin.String? origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + ARG arg0: GET_VAR 'val tmp_26: kotlinx.coroutines.flow.StateFlow? declared in .' type=kotlinx.coroutines.flow.StateFlow? origin=null + ARG arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Null type=kotlin.String? value=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String? origin=null + ARG : GET_VAR 'val tmp_26: kotlinx.coroutines.flow.StateFlow? declared in .' type=kotlinx.coroutines.flow.StateFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowPropertyNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableStateFlowProperty", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowPropertyNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_27 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' type=kotlinx.coroutines.flow.StateFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowPropertyValue visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowPropertyValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlinx.coroutines.flow.StateFlow? [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow? declared in ' type=kotlinx.coroutines.flow.StateFlow? origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in ' + WHEN type=kotlin.String? origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + ARG arg0: GET_VAR 'val tmp_28: kotlinx.coroutines.flow.StateFlow? declared in .' type=kotlinx.coroutines.flow.StateFlow? origin=null + ARG arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Null type=kotlin.String? value=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_28: kotlinx.coroutines.flow.StateFlow? declared in .' type=kotlinx.coroutines.flow.StateFlow? origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowValueNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "nullableStateFlowValue", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowValueNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_29 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowValueValue visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String? + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:nullableStateFlowValueValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_30 type:kotlinx.coroutines.flow.StateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String? origin=null + ARG : GET_VAR 'val tmp_30: kotlinx.coroutines.flow.StateFlow declared in .' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:refinedFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "refinedFlow", swiftName = , exact = ) + ShouldRefineInSwift + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:refinedFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_31 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:refinedStateFlow visibility:public modality:FINAL [val] + annotations: + ShouldRefineInSwift + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:refinedStateFlow visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_32 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:refinedStateValue visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "refinedState", swiftName = , exact = ) + ShouldRefineInSwift + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:refinedStateValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_33 type:kotlinx.coroutines.flow.StateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_33: kotlinx.coroutines.flow.StateFlow declared in .' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:statePropertyFlow visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:statePropertyFlow visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_34 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:statePropertyValue visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "stateProperty", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:statePropertyValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_35 type:kotlinx.coroutines.flow.StateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_35: kotlinx.coroutines.flow.StateFlow declared in .' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "topLevelFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_36 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.Flow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.Flow declared in ' type=kotlinx.coroutines.flow.Flow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelMutableStateFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "topLevelMutableStateFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.MutableStateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelMutableStateFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_37 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.MutableStateFlow declared in ' type=kotlinx.coroutines.flow.MutableStateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelSharedFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "topLevelSharedFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.SharedFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelSharedFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_38 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelSharedFlowReplayCache visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.collections.List + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelSharedFlowReplayCache visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_39 type:kotlinx.coroutines.flow.SharedFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.SharedFlow declared in ' type=kotlinx.coroutines.flow.SharedFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.List declared in ' + CALL 'public abstract fun (): kotlin.collections.List declared in kotlinx.coroutines.flow.SharedFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_39: kotlinx.coroutines.flow.SharedFlow declared in .' type=kotlinx.coroutines.flow.SharedFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelStateFlowNative visibility:public modality:FINAL [val] + annotations: + ObjCName(name = "topLevelStateFlow", swiftName = , exact = ) + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.StateFlow + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelStateFlowNative visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_40 type:kotlinx.coroutines.CoroutineScope? [val] + CONST Null type=kotlinx.coroutines.CoroutineScope? value=null + RETURN type=kotlin.Nothing from='public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelStateFlowValue visibility:public modality:FINAL [val] + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name: visibility:public modality:FINAL returnType:kotlin.String + correspondingProperty: PROPERTY GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:topLevelStateFlowValue visibility:public modality:FINAL [val] + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_41 type:kotlinx.coroutines.flow.StateFlow [val] + CALL 'public final fun (): kotlinx.coroutines.flow.StateFlow declared in ' type=kotlinx.coroutines.flow.StateFlow origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' + CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=null + ARG : GET_VAR 'val tmp_41: kotlinx.coroutines.flow.StateFlow declared in .' type=kotlinx.coroutines.flow.StateFlow origin=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.kt.txt new file mode 100644 index 00000000..6d68075e --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.kt.txt @@ -0,0 +1,660 @@ +// FILE: properties.kt + +@NativeCoroutines +val topLevelFlow: Flow + field = flowOf(value = "OK1") + get + +@NativeCoroutines +val topLevelSharedFlow: SharedFlow + field = apply>(/* = MutableSharedFlow(replay = 1), */ block = local fun MutableSharedFlow.() { + $this$apply.tryEmit(value = "OK2") /*~> Unit */ + } +) + get + +@NativeCoroutines +val topLevelStateFlow: StateFlow + field = MutableStateFlow(value = "OK3") + get + +@NativeCoroutines +val topLevelMutableStateFlow: MutableStateFlow + field = MutableStateFlow(value = "OK4") + get + +@NativeCoroutines +val nullableFlowValue: Flow + field = flowOf(value = null) + get + +@NativeCoroutines +val nullableSharedFlowValue: SharedFlow + field = apply>(/* = MutableSharedFlow(replay = 1), */ block = local fun MutableSharedFlow.() { + $this$apply.tryEmit(value = null) /*~> Unit */ + } +) + get + +@NativeCoroutines +val nullableStateFlowValue: StateFlow + field = MutableStateFlow(value = null) + get + +@NativeCoroutinesState +val stateProperty: StateFlow + field = MutableStateFlow(value = "OK23") + get + +@NativeCoroutinesState +val mutableStateProperty: MutableStateFlow + field = MutableStateFlow(value = "OK24") + get + +@NativeCoroutinesRefined +val refinedFlow: Flow + field = flowOf(value = "OK25") + get + +@NativeCoroutinesRefinedState +val refinedState: StateFlow + field = MutableStateFlow(value = "OK26") + get + +@NativeCoroutinesState +val mutableNullableStateProperty: MutableStateFlow? + field = MutableStateFlow(value = "OK27") + get + +class MyClass28 : MyInterface28 { + @NativeCoroutines + override val interfaceFlowValue: Flow + field = flowOf(value = "OK28") + override get + + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +class MyFlow29 : Flow { + private /* final field */ val $$delegate_0: Flow = flowOf(value = null) + constructor(value1: T1, value2: T2) /* primary */ { + super/*Any*/() + /* () */ + + } + + override suspend fun collect(collector: FlowCollector) { + .#$$delegate_0.collect(collector = collector) + } + +} + +data class MyGenericClass1 { + val value: T + field = value + get + + constructor(value: T) /* primary */ { + super/*Any*/() + /* () */ + + } + + operator fun component1(): T { + return .#value + } + + fun copy(value: T = .#value): MyGenericClass1 { + return MyGenericClass1(value = value) + } + + override operator fun equals(other: Any?): Boolean { + when { + EQEQEQ(arg0 = , arg1 = other) -> return true + } + when { + other !is MyGenericClass1 -> return false + } + val tmp_0: MyGenericClass1 = other /*as MyGenericClass1 */ + when { + EQEQ(arg0 = .#value, arg1 = tmp_0.#value).not() -> return false + } + return true + } + + override fun hashCode(): Int { + return when { + EQEQ(arg0 = .#value, arg1 = null) -> 0 + else -> .#value.hashCode() + } + } + + override fun toString(): String { + return "MyGenericClass1(" + "value=" + .#value + ")" + } + +} + +class MyGenericClass2 { + private val value: T + field = value + private get + + @NativeCoroutines + val genericFlow: Flow + field = flowOf(value = .()) + get + + @NativeCoroutines + val genericSharedFlow: SharedFlow + field = apply>(/* = MutableSharedFlow(replay = 1), */ block = local fun MutableSharedFlow.() { + $this$apply.tryEmit(value = .()) /*~> Unit */ + } +) + get + + @NativeCoroutines + val genericStateFlow: StateFlow + field = MutableStateFlow(value = .()) + get + + constructor(value: T) /* primary */ { + super/*Any*/() + /* () */ + + } + + @ObjCName(name = "genericFlow") + val genericFlowNative: Flow + get(): Flow { + val tmp_1: CoroutineScope? = null + return .() + } + + @ObjCName(name = "genericSharedFlow") + val genericSharedFlowNative: SharedFlow + get(): SharedFlow { + val tmp_2: CoroutineScope? = null + return .() + } + + val genericSharedFlowReplayCache: List + get(): List { + val tmp_3: SharedFlow = .() + return tmp_3.() + } + + @ObjCName(name = "genericStateFlow") + val genericStateFlowNative: StateFlow + get(): StateFlow { + val tmp_4: CoroutineScope? = null + return .() + } + + val genericStateFlowValue: T + get(): T { + val tmp_5: StateFlow = .() + return tmp_5.() + } + +} + +interface MyInterface28 { + @ObjCName(name = "interfaceFlowValue") + val interfaceFlowValueNative: Flow + get(): Flow { + val tmp_6: CoroutineScope? = null + return .() + } + + @NativeCoroutines + abstract val interfaceFlowValue: Flow + abstract get + +} + +fun box(): String { + return runBoxTest(action = local suspend fun BoxTest.() { + $this$runBoxTest.collect(flow = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.values(values = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.values(values = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value?>(value = ()) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = (/* = MyGenericClass1(value = "OK14") */)) + $this$runBoxTest.collect(flow = (/* = MyGenericClass1(value = "OK15") */), maxValues = 1) + $this$runBoxTest.values(values = (/* = MyGenericClass1(value = "OK15") */)) + $this$runBoxTest.collect(flow = (/* = MyGenericClass1(value = "OK16") */), maxValues = 1) + $this$runBoxTest.value(value = (/* = MyGenericClass1(value = "OK16") */)) + $this$runBoxTest.collect(flow = MyGenericClass2(value = "OK17").()) + $this$runBoxTest.collect(flow = MyGenericClass2(value = "OK18").(), maxValues = 1) + $this$runBoxTest.values(values = MyGenericClass2(value = "OK18").()) + $this$runBoxTest.collect(flow = MyGenericClass2(value = "OK19").(), maxValues = 1) + $this$runBoxTest.value(value = MyGenericClass2(value = "OK19").()) + $this$runBoxTest.collect(flow = (/* = "OK20" */)) + $this$runBoxTest.collect(flow = (/* = "OK21" */), maxValues = 1) + $this$runBoxTest.values(values = (/* = "OK21" */)) + $this$runBoxTest.collect(flow = (/* = "OK22" */), maxValues = 1) + $this$runBoxTest.value(value = (/* = "OK22" */)) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.collect(flow = ()) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = (), maxValues = 1) + $this$runBoxTest.value(value = ()) + $this$runBoxTest.collect(flow = CHECK_NOT_NULL>(arg0 = ()), maxValues = 1) + $this$runBoxTest.collect(flow = MyClass28().()) + $this$runBoxTest.collect(flow = ()) + } +) +} + +@NativeCoroutines +val customFlowValue: MyFlow29 + get(): MyFlow29 { + return MyFlow29(value1 = 29, value2 = "OK29") + } + +@NativeCoroutines +val String.extensionFlow: Flow + get(): Flow { + return flowOf(value = ) + } + +@NativeCoroutines +val String.extensionSharedFlow: SharedFlow + get(): SharedFlow { + return apply>(/* = MutableSharedFlow(replay = 1), */ block = local fun MutableSharedFlow.() { + $this$apply.tryEmit(value = ) /*~> Unit */ + } +) + } + +@NativeCoroutines +val String.extensionStateFlow: StateFlow + get(): StateFlow { + return MutableStateFlow(value = ) + } + +@NativeCoroutines +val MyGenericClass1.genericFlow: Flow + get(): Flow { + return flowOf(value = .()) + } + +@NativeCoroutines +val MyGenericClass1.genericSharedFlow: SharedFlow + get(): SharedFlow { + return apply>(/* = MutableSharedFlow(replay = 1), */ block = local fun MutableSharedFlow.() { + $this$apply.tryEmit(value = .()) /*~> Unit */ + } +) + } + +@NativeCoroutines +val MyGenericClass1.genericStateFlow: StateFlow + get(): StateFlow { + return MutableStateFlow(value = .()) + } + +@NativeCoroutines +val nullableFlow: Flow? + get(): Flow? { + return null + } + +@NativeCoroutines +val nullableFlowAndValue: Flow? + get(): Flow? { + return null + } + +@NativeCoroutines +val nullableSharedFlow: SharedFlow? + get(): SharedFlow? { + return null + } + +@NativeCoroutines +val nullableSharedFlowAndValue: SharedFlow? + get(): SharedFlow? { + return null + } + +@NativeCoroutines +val nullableStateFlowAndValue: StateFlow? + get(): StateFlow? { + return null + } + +@NativeCoroutines +val nullableStateFlowProperty: StateFlow? + get(): StateFlow? { + return null + } + +// FILE: __GENERATED DECLARATIONS__.kt + +var topLevelMutableStateFlowValue: String + get(): String { + val tmp_0: MutableStateFlow = () + return tmp_0.() + } + set(value: String) { + return ().( = value) + } + +@ObjCName(name = "mutableStateProperty") +var mutableStatePropertyValue: String + get(): String { + val tmp_1: MutableStateFlow = () + return tmp_1.() + } + set(value: String) { + return ().( = value) + } + +@ObjCName(name = "customFlowValue") +val customFlowValueNative: MyFlow29 + get(): MyFlow29 { + val tmp_2: CoroutineScope? = null + return () + } + +@ObjCName(name = "extensionFlow") +val String.extensionFlowNative: Flow + get(): Flow { + val tmp_3: CoroutineScope? = null + return (/* = */) + } + +@ObjCName(name = "extensionSharedFlow") +val String.extensionSharedFlowNative: SharedFlow + get(): SharedFlow { + val tmp_4: CoroutineScope? = null + return (/* = */) + } + +val String.extensionSharedFlowReplayCache: List + get(): List { + val tmp_5: SharedFlow = (/* = */) + return tmp_5.() + } + +@ObjCName(name = "extensionStateFlow") +val String.extensionStateFlowNative: StateFlow + get(): StateFlow { + val tmp_6: CoroutineScope? = null + return (/* = */) + } + +val String.extensionStateFlowValue: String + get(): String { + val tmp_7: StateFlow = (/* = */) + return tmp_7.() + } + +@ObjCName(name = "genericFlow") +val MyGenericClass1.genericFlowNative: Flow + get(): Flow { + val tmp_8: CoroutineScope? = null + return (/* = */) + } + +@ObjCName(name = "genericSharedFlow") +val MyGenericClass1.genericSharedFlowNative: SharedFlow + get(): SharedFlow { + val tmp_9: CoroutineScope? = null + return (/* = */) + } + +val MyGenericClass1.genericSharedFlowReplayCache: List + get(): List { + val tmp_10: SharedFlow = (/* = */) + return tmp_10.() + } + +@ObjCName(name = "genericStateFlow") +val MyGenericClass1.genericStateFlowNative: StateFlow + get(): StateFlow { + val tmp_11: CoroutineScope? = null + return (/* = */) + } + +val MyGenericClass1.genericStateFlowValue: T + get(): T { + val tmp_12: StateFlow = (/* = */) + return tmp_12.() + } + +val mutableNullableStatePropertyFlow: MutableStateFlow? + get(): MutableStateFlow? { + val tmp_13: CoroutineScope? = null + return () + } + +@ObjCName(name = "mutableNullableStateProperty") +val mutableNullableStatePropertyValue: String? + get(): String? { + val tmp_14: MutableStateFlow? = () + return when { + EQEQ(arg0 = tmp_14, arg1 = null) -> null + else -> tmp_14.() + } + } + +val mutableStatePropertyFlow: MutableStateFlow + get(): MutableStateFlow { + val tmp_15: CoroutineScope? = null + return () + } + +@ObjCName(name = "nullableFlowAndValue") +val nullableFlowAndValueNative: Flow? + get(): Flow? { + val tmp_16: CoroutineScope? = null + return () + } + +@ObjCName(name = "nullableFlow") +val nullableFlowNative: Flow? + get(): Flow? { + val tmp_17: CoroutineScope? = null + return () + } + +@ObjCName(name = "nullableFlowValue") +val nullableFlowValueNative: Flow + get(): Flow { + val tmp_18: CoroutineScope? = null + return () + } + +@ObjCName(name = "nullableSharedFlowAndValue") +val nullableSharedFlowAndValueNative: SharedFlow? + get(): SharedFlow? { + val tmp_19: CoroutineScope? = null + return () + } + +val nullableSharedFlowAndValueReplayCache: List? + get(): List? { + val tmp_20: SharedFlow? = () + return when { + EQEQ(arg0 = tmp_20, arg1 = null) -> null + else -> tmp_20.() + } + } + +@ObjCName(name = "nullableSharedFlow") +val nullableSharedFlowNative: SharedFlow? + get(): SharedFlow? { + val tmp_21: CoroutineScope? = null + return () + } + +val nullableSharedFlowReplayCache: List? + get(): List? { + val tmp_22: SharedFlow? = () + return when { + EQEQ(arg0 = tmp_22, arg1 = null) -> null + else -> tmp_22.() + } + } + +@ObjCName(name = "nullableSharedFlowValue") +val nullableSharedFlowValueNative: SharedFlow + get(): SharedFlow { + val tmp_23: CoroutineScope? = null + return () + } + +val nullableSharedFlowValueReplayCache: List + get(): List { + val tmp_24: SharedFlow = () + return tmp_24.() + } + +@ObjCName(name = "nullableStateFlowAndValue") +val nullableStateFlowAndValueNative: StateFlow? + get(): StateFlow? { + val tmp_25: CoroutineScope? = null + return () + } + +val nullableStateFlowAndValueValue: String? + get(): String? { + val tmp_26: StateFlow? = () + return when { + EQEQ(arg0 = tmp_26, arg1 = null) -> null + else -> tmp_26.() + } + } + +@ObjCName(name = "nullableStateFlowProperty") +val nullableStateFlowPropertyNative: StateFlow? + get(): StateFlow? { + val tmp_27: CoroutineScope? = null + return () + } + +val nullableStateFlowPropertyValue: String? + get(): String? { + val tmp_28: StateFlow? = () + return when { + EQEQ(arg0 = tmp_28, arg1 = null) -> null + else -> tmp_28.() + } + } + +@ObjCName(name = "nullableStateFlowValue") +val nullableStateFlowValueNative: StateFlow + get(): StateFlow { + val tmp_29: CoroutineScope? = null + return () + } + +val nullableStateFlowValueValue: String? + get(): String? { + val tmp_30: StateFlow = () + return tmp_30.() + } + +@ObjCName(name = "refinedFlow") +@ShouldRefineInSwift +val refinedFlowNative: Flow + get(): Flow { + val tmp_31: CoroutineScope? = null + return () + } + +@ShouldRefineInSwift +val refinedStateFlow: StateFlow + get(): StateFlow { + val tmp_32: CoroutineScope? = null + return () + } + +@ObjCName(name = "refinedState") +@ShouldRefineInSwift +val refinedStateValue: String + get(): String { + val tmp_33: StateFlow = () + return tmp_33.() + } + +val statePropertyFlow: StateFlow + get(): StateFlow { + val tmp_34: CoroutineScope? = null + return () + } + +@ObjCName(name = "stateProperty") +val statePropertyValue: String + get(): String { + val tmp_35: StateFlow = () + return tmp_35.() + } + +@ObjCName(name = "topLevelFlow") +val topLevelFlowNative: Flow + get(): Flow { + val tmp_36: CoroutineScope? = null + return () + } + +@ObjCName(name = "topLevelMutableStateFlow") +val topLevelMutableStateFlowNative: MutableStateFlow + get(): MutableStateFlow { + val tmp_37: CoroutineScope? = null + return () + } + +@ObjCName(name = "topLevelSharedFlow") +val topLevelSharedFlowNative: SharedFlow + get(): SharedFlow { + val tmp_38: CoroutineScope? = null + return () + } + +val topLevelSharedFlowReplayCache: List + get(): List { + val tmp_39: SharedFlow = () + return tmp_39.() + } + +@ObjCName(name = "topLevelStateFlow") +val topLevelStateFlowNative: StateFlow + get(): StateFlow { + val tmp_40: CoroutineScope? = null + return () + } + +val topLevelStateFlowValue: String + get(): String { + val tmp_41: StateFlow = () + return tmp_41.() + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.txt new file mode 100644 index 00000000..6d8300d0 --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.fir.txt @@ -0,0 +1,447 @@ +FILE: properties.kt + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val topLevelFlow: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK1)) + public get(): R|kotlinx/coroutines/flow/Flow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val topLevelSharedFlow: R|kotlinx/coroutines/flow/SharedFlow| = R|kotlinx/coroutines/flow/MutableSharedFlow|(Int(1)).R|kotlin/apply||>( = apply@fun R|kotlinx/coroutines/flow/MutableSharedFlow|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|SubstitutionOverride|(String(OK2)) + } + ) + public get(): R|kotlinx/coroutines/flow/SharedFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val topLevelStateFlow: R|kotlinx/coroutines/flow/StateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK3)) + public get(): R|kotlinx/coroutines/flow/StateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val topLevelMutableStateFlow: R|kotlinx/coroutines/flow/MutableStateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK4)) + public get(): R|kotlinx/coroutines/flow/MutableStateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableFlowValue: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(Null(null)) + public get(): R|kotlinx/coroutines/flow/Flow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableSharedFlowValue: R|kotlinx/coroutines/flow/SharedFlow| = R|kotlinx/coroutines/flow/MutableSharedFlow|(Int(1)).R|kotlin/apply||>( = apply@fun R|kotlinx/coroutines/flow/MutableSharedFlow|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|SubstitutionOverride|(Null(null)) + } + ) + public get(): R|kotlinx/coroutines/flow/SharedFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableStateFlowValue: R|kotlinx/coroutines/flow/StateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(Null(null)) + public get(): R|kotlinx/coroutines/flow/StateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableFlow: R|kotlinx/coroutines/flow/Flow?| + public get(): R|kotlinx/coroutines/flow/Flow?| { + ^ Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableSharedFlow: R|kotlinx/coroutines/flow/SharedFlow?| + public get(): R|kotlinx/coroutines/flow/SharedFlow?| { + ^ Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableStateFlowProperty: R|kotlinx/coroutines/flow/StateFlow?| + public get(): R|kotlinx/coroutines/flow/StateFlow?| { + ^ Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableFlowAndValue: R|kotlinx/coroutines/flow/Flow?| + public get(): R|kotlinx/coroutines/flow/Flow?| { + ^ Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableSharedFlowAndValue: R|kotlinx/coroutines/flow/SharedFlow?| + public get(): R|kotlinx/coroutines/flow/SharedFlow?| { + ^ Null(null) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val nullableStateFlowAndValue: R|kotlinx/coroutines/flow/StateFlow?| + public get(): R|kotlinx/coroutines/flow/StateFlow?| { + ^ Null(null) + } + public final data class MyGenericClass1 : R|kotlin/Any| { + public constructor(value: R|T|): R|MyGenericClass1| { + super() + } + + public final val value: R|T| = R|/value| + public get(): R|T| + + public final operator fun component1(): R|T| + + public final fun copy(value: R|T| = this@R|/MyGenericClass1|.R|/MyGenericClass1.value|): R|MyGenericClass1| + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|MyGenericClass1|.genericFlow: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ^ R|kotlinx/coroutines/flow/flowOf|(this@R|/genericFlow|.R|SubstitutionOverride|) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|MyGenericClass1|.genericSharedFlow: R|kotlinx/coroutines/flow/SharedFlow| + public get(): R|kotlinx/coroutines/flow/SharedFlow| { + ^ R|kotlinx/coroutines/flow/MutableSharedFlow|(Int(1)).R|kotlin/apply||>( = apply@fun R|kotlinx/coroutines/flow/MutableSharedFlow|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|SubstitutionOverride|(this@R|/genericSharedFlow|.R|SubstitutionOverride|) + } + ) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|MyGenericClass1|.genericStateFlow: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ^ R|kotlinx/coroutines/flow/MutableStateFlow|(this@R|/genericStateFlow|.R|SubstitutionOverride|) + } + public final class MyGenericClass2 : R|kotlin/Any| { + public constructor(value: R|T|): R|MyGenericClass2| { + super() + } + + private final val value: R|T| = R|/value| + private get(): R|T| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val genericFlow: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(this@R|/MyGenericClass2|.R|/MyGenericClass2.value|) + public get(): R|kotlinx/coroutines/flow/Flow| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val genericSharedFlow: R|kotlinx/coroutines/flow/SharedFlow| = R|kotlinx/coroutines/flow/MutableSharedFlow|(Int(1)).R|kotlin/apply||>( = apply@fun R|kotlinx/coroutines/flow/MutableSharedFlow|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|SubstitutionOverride|(this@R|/MyGenericClass2|.R|/MyGenericClass2.value|) + } + ) + public get(): R|kotlinx/coroutines/flow/SharedFlow| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val genericStateFlow: R|kotlinx/coroutines/flow/StateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(this@R|/MyGenericClass2|.R|/MyGenericClass2.value|) + public get(): R|kotlinx/coroutines/flow/StateFlow| + + @R|kotlin/native/ObjCName|(name = String(genericFlow)) public final val genericFlowNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/MyGenericClass2.genericFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + @R|kotlin/native/ObjCName|(name = String(genericSharedFlow)) public final val genericSharedFlowNative: R|kotlinx/coroutines/flow/SharedFlow| + public get(): R|kotlinx/coroutines/flow/SharedFlow| { + ::R|/MyGenericClass2.genericSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + public final val genericSharedFlowReplayCache: R|kotlin/collections/List| + public get(): R|kotlin/collections/List| { + ::R|/MyGenericClass2.genericSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + @R|kotlin/native/ObjCName|(name = String(genericStateFlow)) public final val genericStateFlowNative: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/MyGenericClass2.genericStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + public final val genericStateFlowValue: R|T| + public get(): R|T| { + ::R|/MyGenericClass2.genericStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|kotlin/String|.extensionFlow: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ^ R|kotlinx/coroutines/flow/flowOf|(this@R|/extensionFlow|) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|kotlin/String|.extensionSharedFlow: R|kotlinx/coroutines/flow/SharedFlow| + public get(): R|kotlinx/coroutines/flow/SharedFlow| { + ^ R|kotlinx/coroutines/flow/MutableSharedFlow|(Int(1)).R|kotlin/apply||>( = apply@fun R|kotlinx/coroutines/flow/MutableSharedFlow|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|SubstitutionOverride|(this@R|/extensionSharedFlow|) + } + ) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val R|kotlin/String|.extensionStateFlow: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ^ R|kotlinx/coroutines/flow/MutableStateFlow|(this@R|/extensionStateFlow|) + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesState|() public final val stateProperty: R|kotlinx/coroutines/flow/StateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK23)) + public get(): R|kotlinx/coroutines/flow/StateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesState|() public final val mutableStateProperty: R|kotlinx/coroutines/flow/MutableStateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK24)) + public get(): R|kotlinx/coroutines/flow/MutableStateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesRefined|() public final val refinedFlow: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK25)) + public get(): R|kotlinx/coroutines/flow/Flow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesRefinedState|() public final val refinedState: R|kotlinx/coroutines/flow/StateFlow| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK26)) + public get(): R|kotlinx/coroutines/flow/StateFlow| + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutinesState|() public final val mutableNullableStateProperty: R|kotlinx/coroutines/flow/MutableStateFlow?| = R|kotlinx/coroutines/flow/MutableStateFlow|(String(OK27)) + public get(): R|kotlinx/coroutines/flow/MutableStateFlow?| + public abstract interface MyInterface28 : R|kotlin/Any| { + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public abstract val interfaceFlowValue: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| + + @R|kotlin/native/ObjCName|(name = String(interfaceFlowValue)) public open val interfaceFlowValueNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/MyInterface28.interfaceFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + public final class MyClass28 : R|MyInterface28| { + public constructor(): R|MyClass28| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public open override val interfaceFlowValue: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(String(OK28)) + public get(): R|kotlinx/coroutines/flow/Flow| + + } + public final class MyFlow29 : R|kotlinx/coroutines/flow/Flow| { + public constructor(value1: R|T1|, value2: R|T2|): R|MyFlow29| { + super() + } + + private final field $$delegate_0: R|kotlinx/coroutines/flow/Flow| = R|kotlinx/coroutines/flow/flowOf|(Null(null)) + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final val customFlowValue: R|MyFlow29| + public get(): R|MyFlow29| { + ^ R|/MyFlow29.MyFlow29|(Int(29), String(OK29)) + } + public final fun box(): R|kotlin/String| { + ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/topLevelFlowNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/topLevelSharedFlowNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.values|(R|/topLevelSharedFlowReplayCache|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/topLevelStateFlowNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/topLevelStateFlowValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/topLevelMutableStateFlowNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/topLevelMutableStateFlowValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/nullableFlowValueNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/nullableSharedFlowValueNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.values|(R|/nullableSharedFlowValueReplayCache|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/nullableStateFlowValueNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/nullableStateFlowValueValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableFlowNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableSharedFlowNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableSharedFlowReplayCache|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableStateFlowPropertyNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/nullableStateFlowPropertyValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableFlowAndValueNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableSharedFlowAndValueNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableSharedFlowAndValueReplayCache|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|?|>(R|/nullableStateFlowAndValueNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/nullableStateFlowAndValueValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyGenericClass1.MyGenericClass1|(String(OK14)).R|/genericFlowNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyGenericClass1.MyGenericClass1|(String(OK15)).R|/genericSharedFlowNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.values|(R|/MyGenericClass1.MyGenericClass1|(String(OK15)).R|/genericSharedFlowReplayCache|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyGenericClass1.MyGenericClass1|(String(OK16)).R|/genericStateFlowNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/MyGenericClass1.MyGenericClass1|(String(OK16)).R|/genericStateFlowValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyGenericClass2.MyGenericClass2|(String(OK17)).R|SubstitutionOverride|>|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyGenericClass2.MyGenericClass2|(String(OK18)).R|SubstitutionOverride|>|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.values|(R|/MyGenericClass2.MyGenericClass2|(String(OK18)).R|SubstitutionOverride|>|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyGenericClass2.MyGenericClass2|(String(OK19)).R|SubstitutionOverride|>|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/MyGenericClass2.MyGenericClass2|(String(OK19)).R|SubstitutionOverride|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(String(OK20).R|/extensionFlowNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(String(OK21).R|/extensionSharedFlowNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.values|(String(OK21).R|/extensionSharedFlowReplayCache|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(String(OK22).R|/extensionStateFlowNative|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(String(OK22).R|/extensionStateFlowValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/statePropertyValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/statePropertyFlow|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/mutableStatePropertyValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/mutableStatePropertyFlow|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/refinedFlowNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/refinedStateValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/refinedStateFlow|, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.value|(R|/mutableNullableStatePropertyValue|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/mutableNullableStatePropertyFlow|!!, Int(1)) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/MyClass28.MyClass28|().R|/MyInterface28.interfaceFlowValueNative|) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.collect|(R|/customFlowValueNative|) + } + ) + } +FILE: __GENERATED DECLARATIONS__.kt + @R|kotlin/native/ObjCName|(name = String(topLevelFlow)) public final val topLevelFlowNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/topLevelFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(topLevelSharedFlow)) public final val topLevelSharedFlowNative: R|kotlinx/coroutines/flow/SharedFlow| + public get(): R|kotlinx/coroutines/flow/SharedFlow| { + ::R|/topLevelSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val topLevelSharedFlowReplayCache: R|kotlin/collections/List| + public get(): R|kotlin/collections/List| { + ::R|/topLevelSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(topLevelStateFlow)) public final val topLevelStateFlowNative: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/topLevelStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val topLevelStateFlowValue: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/topLevelStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(topLevelMutableStateFlow)) public final val topLevelMutableStateFlowNative: R|kotlinx/coroutines/flow/MutableStateFlow| + public get(): R|kotlinx/coroutines/flow/MutableStateFlow| { + ::R|/topLevelMutableStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final var topLevelMutableStateFlowValue: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/topLevelMutableStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public set(value: R|kotlin/String|): R|kotlin/Unit| + @R|kotlin/native/ObjCName|(name = String(nullableFlowValue)) public final val nullableFlowValueNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/nullableFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableSharedFlowValue)) public final val nullableSharedFlowValueNative: R|kotlinx/coroutines/flow/SharedFlow| + public get(): R|kotlinx/coroutines/flow/SharedFlow| { + ::R|/nullableSharedFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val nullableSharedFlowValueReplayCache: R|kotlin/collections/List| + public get(): R|kotlin/collections/List| { + ::R|/nullableSharedFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableStateFlowValue)) public final val nullableStateFlowValueNative: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/nullableStateFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val nullableStateFlowValueValue: R|kotlin/String?| + public get(): R|kotlin/String?| { + ::R|/nullableStateFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableFlow)) public final val nullableFlowNative: R|kotlinx/coroutines/flow/Flow?| + public get(): R|kotlinx/coroutines/flow/Flow?| { + ::R|/nullableFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableSharedFlow)) public final val nullableSharedFlowNative: R|kotlinx/coroutines/flow/SharedFlow?| + public get(): R|kotlinx/coroutines/flow/SharedFlow?| { + ::R|/nullableSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val nullableSharedFlowReplayCache: R|kotlin/collections/List?| + public get(): R|kotlin/collections/List?| { + ::R|/nullableSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableStateFlowProperty)) public final val nullableStateFlowPropertyNative: R|kotlinx/coroutines/flow/StateFlow?| + public get(): R|kotlinx/coroutines/flow/StateFlow?| { + ::R|/nullableStateFlowProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val nullableStateFlowPropertyValue: R|kotlin/String?| + public get(): R|kotlin/String?| { + ::R|/nullableStateFlowProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableFlowAndValue)) public final val nullableFlowAndValueNative: R|kotlinx/coroutines/flow/Flow?| + public get(): R|kotlinx/coroutines/flow/Flow?| { + ::R|/nullableFlowAndValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableSharedFlowAndValue)) public final val nullableSharedFlowAndValueNative: R|kotlinx/coroutines/flow/SharedFlow?| + public get(): R|kotlinx/coroutines/flow/SharedFlow?| { + ::R|/nullableSharedFlowAndValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val nullableSharedFlowAndValueReplayCache: R|kotlin/collections/List?| + public get(): R|kotlin/collections/List?| { + ::R|/nullableSharedFlowAndValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(nullableStateFlowAndValue)) public final val nullableStateFlowAndValueNative: R|kotlinx/coroutines/flow/StateFlow?| + public get(): R|kotlinx/coroutines/flow/StateFlow?| { + ::R|/nullableStateFlowAndValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val nullableStateFlowAndValueValue: R|kotlin/String?| + public get(): R|kotlin/String?| { + ::R|/nullableStateFlowAndValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(genericFlow)) public final val R|MyGenericClass1|.genericFlowNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/genericFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(genericSharedFlow)) public final val R|MyGenericClass1|.genericSharedFlowNative: R|kotlinx/coroutines/flow/SharedFlow| + public get(): R|kotlinx/coroutines/flow/SharedFlow| { + ::R|/genericSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val R|MyGenericClass1|.genericSharedFlowReplayCache: R|kotlin/collections/List| + public get(): R|kotlin/collections/List| { + ::R|/genericSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(genericStateFlow)) public final val R|MyGenericClass1|.genericStateFlowNative: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/genericStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val R|MyGenericClass1|.genericStateFlowValue: R|T| + public get(): R|T| { + ::R|/genericStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(extensionFlow)) public final val R|kotlin/String|.extensionFlowNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/extensionFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(extensionSharedFlow)) public final val R|kotlin/String|.extensionSharedFlowNative: R|kotlinx/coroutines/flow/SharedFlow| + public get(): R|kotlinx/coroutines/flow/SharedFlow| { + ::R|/extensionSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val R|kotlin/String|.extensionSharedFlowReplayCache: R|kotlin/collections/List| + public get(): R|kotlin/collections/List| { + ::R|/extensionSharedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(extensionStateFlow)) public final val R|kotlin/String|.extensionStateFlowNative: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/extensionStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val R|kotlin/String|.extensionStateFlowValue: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/extensionStateFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(customFlowValue)) public final val customFlowValueNative: R|MyFlow29| + public get(): R|MyFlow29| { + ::R|/customFlowValue| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(refinedFlow)) @R|kotlin/native/ShouldRefineInSwift|() public final val refinedFlowNative: R|kotlinx/coroutines/flow/Flow| + public get(): R|kotlinx/coroutines/flow/Flow| { + ::R|/refinedFlow| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(refinedState)) @R|kotlin/native/ShouldRefineInSwift|() public final val refinedStateValue: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/refinedState| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ShouldRefineInSwift|() public final val refinedStateFlow: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/refinedState| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(stateProperty)) public final val statePropertyValue: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/stateProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val statePropertyFlow: R|kotlinx/coroutines/flow/StateFlow| + public get(): R|kotlinx/coroutines/flow/StateFlow| { + ::R|/stateProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(mutableStateProperty)) public final var mutableStatePropertyValue: R|kotlin/String| + public get(): R|kotlin/String| { + ::R|/mutableStateProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public set(value: R|kotlin/String|): R|kotlin/Unit| + public final val mutableStatePropertyFlow: R|kotlinx/coroutines/flow/MutableStateFlow| + public get(): R|kotlinx/coroutines/flow/MutableStateFlow| { + ::R|/mutableStateProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(mutableNullableStateProperty)) public final val mutableNullableStatePropertyValue: R|kotlin/String?| + public get(): R|kotlin/String?| { + ::R|/mutableNullableStateProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + public final val mutableNullableStatePropertyFlow: R|kotlinx/coroutines/flow/MutableStateFlow?| + public get(): R|kotlinx/coroutines/flow/MutableStateFlow?| { + ::R|/mutableNullableStateProperty| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.kt new file mode 120000 index 00000000..23f2717d --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/properties.kt @@ -0,0 +1 @@ +../properties.kt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.box.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.box.txt new file mode 120000 index 00000000..8a49f49f --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.box.txt @@ -0,0 +1 @@ +../viewmodelscope.box.txt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt new file mode 100644 index 00000000..4eefbe5f --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt @@ -0,0 +1,452 @@ +FILE fqName:androidx.lifecycle fileName:/androidxviewmodel.kt + CLASS CLASS name:ViewModel modality:OPEN visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:androidx.lifecycle.ViewModel + CONSTRUCTOR visibility:public returnType:androidx.lifecycle.ViewModel [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ViewModel modality:OPEN visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + PROPERTY name:viewModelScope visibility:public modality:FINAL [val] + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:androidx.lifecycle.ViewModel + correspondingProperty: PROPERTY name:viewModelScope visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: androidx.lifecycle.ViewModel): kotlinx.coroutines.CoroutineScope declared in androidx.lifecycle' + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers +FILE fqName:com.rickclephas.kmp.observableviewmodel fileName:/observableviewmodel.kt + CLASS CLASS name:ViewModel modality:OPEN visibility:public superTypes:[androidx.lifecycle.ViewModel] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:com.rickclephas.kmp.observableviewmodel.ViewModel + PROPERTY name:viewModelScope visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:viewModelScope type:com.rickclephas.kmp.observableviewmodel.ViewModelScope visibility:private [final] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in com.rickclephas.kmp.observableviewmodel.ViewModelScope' type=com.rickclephas.kmp.observableviewmodel.ViewModelScope origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL returnType:com.rickclephas.kmp.observableviewmodel.ViewModelScope + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:com.rickclephas.kmp.observableviewmodel.ViewModel + correspondingProperty: PROPERTY name:viewModelScope visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:viewModelScope type:com.rickclephas.kmp.observableviewmodel.ViewModelScope visibility:private [final]' type=com.rickclephas.kmp.observableviewmodel.ViewModelScope origin=null + receiver: GET_VAR ': com.rickclephas.kmp.observableviewmodel.ViewModel declared in com.rickclephas.kmp.observableviewmodel.ViewModel.' type=com.rickclephas.kmp.observableviewmodel.ViewModel origin=null + CONSTRUCTOR visibility:public returnType:com.rickclephas.kmp.observableviewmodel.ViewModel [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in androidx.lifecycle.ViewModel' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ViewModel modality:OPEN visibility:public superTypes:[androidx.lifecycle.ViewModel]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in androidx.lifecycle.ViewModel + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in androidx.lifecycle.ViewModel + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in androidx.lifecycle.ViewModel + CLASS CLASS name:ViewModelScope modality:FINAL visibility:public superTypes:[kotlin.Any] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:com.rickclephas.kmp.observableviewmodel.ViewModelScope + CONSTRUCTOR visibility:public returnType:com.rickclephas.kmp.observableviewmodel.ViewModelScope [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ViewModelScope modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + PROPERTY name:coroutineScope visibility:public modality:FINAL [val] + FUN name: visibility:public modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:com.rickclephas.kmp.observableviewmodel.ViewModelScope + correspondingProperty: PROPERTY name:coroutineScope visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (: com.rickclephas.kmp.observableviewmodel.ViewModelScope): kotlinx.coroutines.CoroutineScope declared in com.rickclephas.kmp.observableviewmodel' + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers +FILE fqName: fileName:/viewmodelscope.kt + PROPERTY name:unusedCoroutineScope visibility:internal modality:FINAL [val] + annotations: + NativeCoroutineScope + FIELD PROPERTY_BACKING_FIELD name:unusedCoroutineScope type:kotlinx.coroutines.CoroutineScope visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:internal modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + correspondingProperty: PROPERTY name:unusedCoroutineScope visibility:internal modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:unusedCoroutineScope type:kotlinx.coroutines.CoroutineScope visibility:private [final,static]' type=kotlinx.coroutines.CoroutineScope origin=null + CLASS CLASS name:MyAndroidXViewModel1 modality:FINAL visibility:public superTypes:[androidx.lifecycle.ViewModel] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyAndroidXViewModel1 + CONSTRUCTOR visibility:public returnType:.MyAndroidXViewModel1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in androidx.lifecycle.ViewModel' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyAndroidXViewModel1 modality:FINAL visibility:public superTypes:[androidx.lifecycle.ViewModel]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in androidx.lifecycle.ViewModel + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in androidx.lifecycle.ViewModel + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in androidx.lifecycle.ViewModel + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue1Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyAndroidXViewModel1 + annotations: + ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'public final fun (: androidx.lifecycle.ViewModel): kotlinx.coroutines.CoroutineScope declared in androidx.lifecycle' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyAndroidXViewModel1 declared in .MyAndroidXViewModel1.returnSuspendValue1Native' type=.MyAndroidXViewModel1 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1Native (): kotlin.String declared in .MyAndroidXViewModel1' + CALL 'public final fun returnSuspendValue1 (): kotlin.String declared in .MyAndroidXViewModel1' type=kotlin.String origin=null + ARG : GET_VAR ': .MyAndroidXViewModel1 declared in .MyAndroidXViewModel1.returnSuspendValue1Native' type=.MyAndroidXViewModel1 origin=null + FUN name:returnSuspendValue1 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyAndroidXViewModel1 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1 (): kotlin.String declared in .MyAndroidXViewModel1' + CONST String type=kotlin.String value="OK1" + CLASS CLASS name:MyAndroidXViewModel2 modality:FINAL visibility:public superTypes:[androidx.lifecycle.ViewModel] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyAndroidXViewModel2 + PROPERTY name:customCoroutineScope visibility:internal modality:FINAL [val] + annotations: + NativeCoroutineScope + FIELD PROPERTY_BACKING_FIELD name:customCoroutineScope type:kotlinx.coroutines.CoroutineScope visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:internal modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyAndroidXViewModel2 + correspondingProperty: PROPERTY name:customCoroutineScope visibility:internal modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyAndroidXViewModel2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:customCoroutineScope type:kotlinx.coroutines.CoroutineScope visibility:private [final]' type=kotlinx.coroutines.CoroutineScope origin=null + receiver: GET_VAR ': .MyAndroidXViewModel2 declared in .MyAndroidXViewModel2.' type=.MyAndroidXViewModel2 origin=null + CONSTRUCTOR visibility:public returnType:.MyAndroidXViewModel2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in androidx.lifecycle.ViewModel' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyAndroidXViewModel2 modality:FINAL visibility:public superTypes:[androidx.lifecycle.ViewModel]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in androidx.lifecycle.ViewModel + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in androidx.lifecycle.ViewModel + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in androidx.lifecycle.ViewModel + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue1Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyAndroidXViewModel2 + annotations: + ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyAndroidXViewModel2' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyAndroidXViewModel2 declared in .MyAndroidXViewModel2.returnSuspendValue1Native' type=.MyAndroidXViewModel2 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1Native (): kotlin.String declared in .MyAndroidXViewModel2' + CALL 'public final fun returnSuspendValue1 (): kotlin.String declared in .MyAndroidXViewModel2' type=kotlin.String origin=null + ARG : GET_VAR ': .MyAndroidXViewModel2 declared in .MyAndroidXViewModel2.returnSuspendValue1Native' type=.MyAndroidXViewModel2 origin=null + FUN name:returnSuspendValue1 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyAndroidXViewModel2 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1 (): kotlin.String declared in .MyAndroidXViewModel2' + CONST String type=kotlin.String value="OK5" + CLASS CLASS name:MyObservableViewModel1 modality:FINAL visibility:public superTypes:[com.rickclephas.kmp.observableviewmodel.ViewModel] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyObservableViewModel1 + CONSTRUCTOR visibility:public returnType:.MyObservableViewModel1 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in com.rickclephas.kmp.observableviewmodel.ViewModel' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyObservableViewModel1 modality:FINAL visibility:public superTypes:[com.rickclephas.kmp.observableviewmodel.ViewModel]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue1Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyObservableViewModel1 + annotations: + ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'public final fun (: com.rickclephas.kmp.observableviewmodel.ViewModelScope): kotlinx.coroutines.CoroutineScope declared in com.rickclephas.kmp.observableviewmodel' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : CALL 'public final fun (): com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel' type=com.rickclephas.kmp.observableviewmodel.ViewModelScope origin=null + ARG : GET_VAR ': .MyObservableViewModel1 declared in .MyObservableViewModel1.returnSuspendValue1Native' type=.MyObservableViewModel1 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1Native (): kotlin.String declared in .MyObservableViewModel1' + CALL 'public final fun returnSuspendValue1 (): kotlin.String declared in .MyObservableViewModel1' type=kotlin.String origin=null + ARG : GET_VAR ': .MyObservableViewModel1 declared in .MyObservableViewModel1.returnSuspendValue1Native' type=.MyObservableViewModel1 origin=null + FUN name:returnSuspendValue1 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyObservableViewModel1 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1 (): kotlin.String declared in .MyObservableViewModel1' + CONST String type=kotlin.String value="OK3" + PROPERTY FAKE_OVERRIDE name:viewModelScope visibility:public modality:FINAL [fake_override,val] + overridden: + public final viewModelScope: com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL returnType:com.rickclephas.kmp.observableviewmodel.ViewModelScope [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:com.rickclephas.kmp.observableviewmodel.ViewModel + correspondingProperty: PROPERTY FAKE_OVERRIDE name:viewModelScope visibility:public modality:FINAL [fake_override,val] + overridden: + public final fun (): com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel + CLASS CLASS name:MyObservableViewModel2 modality:FINAL visibility:public superTypes:[com.rickclephas.kmp.observableviewmodel.ViewModel] + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:.MyObservableViewModel2 + PROPERTY name:customCoroutineScope visibility:internal modality:FINAL [val] + annotations: + NativeCoroutineScope + FIELD PROPERTY_BACKING_FIELD name:customCoroutineScope type:kotlinx.coroutines.CoroutineScope visibility:private [final] + EXPRESSION_BODY + CALL 'public final fun CoroutineScope (context: kotlin.coroutines.CoroutineContext): kotlinx.coroutines.CoroutineScope declared in kotlinx.coroutines' type=kotlinx.coroutines.CoroutineScope origin=null + ARG context: CALL 'public final fun (): kotlinx.coroutines.CoroutineDispatcher declared in kotlinx.coroutines.Dispatchers' type=kotlinx.coroutines.CoroutineDispatcher origin=GET_PROPERTY + ARG : GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Dispatchers modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlinx.coroutines.Dispatchers + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:internal modality:FINAL returnType:kotlinx.coroutines.CoroutineScope + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyObservableViewModel2 + correspondingProperty: PROPERTY name:customCoroutineScope visibility:internal modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyObservableViewModel2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:customCoroutineScope type:kotlinx.coroutines.CoroutineScope visibility:private [final]' type=kotlinx.coroutines.CoroutineScope origin=null + receiver: GET_VAR ': .MyObservableViewModel2 declared in .MyObservableViewModel2.' type=.MyObservableViewModel2 origin=null + CONSTRUCTOR visibility:public returnType:.MyObservableViewModel2 [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in com.rickclephas.kmp.observableviewmodel.ViewModel' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyObservableViewModel2 modality:FINAL visibility:public superTypes:[com.rickclephas.kmp.observableviewmodel.ViewModel]' type=kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun hashCode (): kotlin.Int declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + overridden: + public open fun toString (): kotlin.String declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue1Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyObservableViewModel2 + annotations: + ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyObservableViewModel2' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyObservableViewModel2 declared in .MyObservableViewModel2.returnSuspendValue1Native' type=.MyObservableViewModel2 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1Native (): kotlin.String declared in .MyObservableViewModel2' + CALL 'public final fun returnSuspendValue1 (): kotlin.String declared in .MyObservableViewModel2' type=kotlin.String origin=null + ARG : GET_VAR ': .MyObservableViewModel2 declared in .MyObservableViewModel2.returnSuspendValue1Native' type=.MyObservableViewModel2 origin=null + FUN name:returnSuspendValue1 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyObservableViewModel2 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue1 (): kotlin.String declared in .MyObservableViewModel2' + CONST String type=kotlin.String value="OK7" + PROPERTY FAKE_OVERRIDE name:viewModelScope visibility:public modality:FINAL [fake_override,val] + overridden: + public final viewModelScope: com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL returnType:com.rickclephas.kmp.observableviewmodel.ViewModelScope [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:com.rickclephas.kmp.observableviewmodel.ViewModel + correspondingProperty: PROPERTY FAKE_OVERRIDE name:viewModelScope visibility:public modality:FINAL [fake_override,val] + overridden: + public final fun (): com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel + FUN name:box visibility:public modality:FINAL returnType:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CALL 'public final fun runBoxTest (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.String declared in com.rickclephas.kmp.nativecoroutines' type=kotlin.String origin=null + ARG action: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest + BLOCK_BODY + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.String declared in .MyAndroidXViewModel1' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel1' type=.MyAndroidXViewModel1 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyAndroidXViewModel1): kotlin.String declared in ' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel1' type=.MyAndroidXViewModel1 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.String declared in .MyObservableViewModel1' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel1' type=.MyObservableViewModel1 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyObservableViewModel1): kotlin.String declared in ' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel1' type=.MyObservableViewModel1 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.String declared in .MyAndroidXViewModel2' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel2' type=.MyAndroidXViewModel2 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyAndroidXViewModel2): kotlin.String declared in ' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel2' type=.MyAndroidXViewModel2 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.String declared in .MyObservableViewModel2' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel2' type=.MyObservableViewModel2 origin=null + CALL 'public final fun await (result: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + TYPE_ARG T: kotlin.String + ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT + ARG result: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.String [suspend] + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyObservableViewModel2): kotlin.String declared in ' type=kotlin.String origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel2' type=.MyObservableViewModel2 origin=null + FUN name:returnSuspendValue2 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyAndroidXViewModel1 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2 (: .MyAndroidXViewModel1): kotlin.String declared in ' + CONST String type=kotlin.String value="OK2" + FUN name:returnSuspendValue2 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyAndroidXViewModel2 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2 (: .MyAndroidXViewModel2): kotlin.String declared in ' + CONST String type=kotlin.String value="OK6" + FUN name:returnSuspendValue2 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyObservableViewModel1 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2 (: .MyObservableViewModel1): kotlin.String declared in ' + CONST String type=kotlin.String value="OK4" + FUN name:returnSuspendValue2 visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyObservableViewModel2 + annotations: + NativeCoroutines + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2 (: .MyObservableViewModel2): kotlin.String declared in ' + CONST String type=kotlin.String value="OK8" +FILE fqName: fileName:__GENERATED DECLARATIONS__.kt + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue2Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyAndroidXViewModel1 + annotations: + ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'public final fun (: androidx.lifecycle.ViewModel): kotlinx.coroutines.CoroutineScope declared in androidx.lifecycle' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyAndroidXViewModel1 declared in .returnSuspendValue2Native' type=.MyAndroidXViewModel1 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2Native (: .MyAndroidXViewModel1): kotlin.String declared in ' + CALL 'public final fun returnSuspendValue2 (: .MyAndroidXViewModel1): kotlin.String declared in ' type=kotlin.String origin=null + ARG : GET_VAR ': .MyAndroidXViewModel1 declared in .returnSuspendValue2Native' type=.MyAndroidXViewModel1 origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue2Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyAndroidXViewModel2 + annotations: + ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'public final fun (: androidx.lifecycle.ViewModel): kotlinx.coroutines.CoroutineScope declared in androidx.lifecycle' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : GET_VAR ': .MyAndroidXViewModel2 declared in .returnSuspendValue2Native' type=.MyAndroidXViewModel2 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2Native (: .MyAndroidXViewModel2): kotlin.String declared in ' + CALL 'public final fun returnSuspendValue2 (: .MyAndroidXViewModel2): kotlin.String declared in ' type=kotlin.String origin=null + ARG : GET_VAR ': .MyAndroidXViewModel2 declared in .returnSuspendValue2Native' type=.MyAndroidXViewModel2 origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue2Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyObservableViewModel1 + annotations: + ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'public final fun (: com.rickclephas.kmp.observableviewmodel.ViewModelScope): kotlinx.coroutines.CoroutineScope declared in com.rickclephas.kmp.observableviewmodel' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : CALL 'public final fun (): com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel' type=com.rickclephas.kmp.observableviewmodel.ViewModelScope origin=null + ARG : GET_VAR ': .MyObservableViewModel1 declared in .returnSuspendValue2Native' type=.MyObservableViewModel1 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2Native (: .MyObservableViewModel1): kotlin.String declared in ' + CALL 'public final fun returnSuspendValue2 (: .MyObservableViewModel1): kotlin.String declared in ' type=kotlin.String origin=null + ARG : GET_VAR ': .MyObservableViewModel1 declared in .returnSuspendValue2Native' type=.MyObservableViewModel1 origin=null + FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValue2Native visibility:public modality:FINAL returnType:kotlin.String [suspend] + VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyObservableViewModel2 + annotations: + ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope [val] + CALL 'public final fun (: com.rickclephas.kmp.observableviewmodel.ViewModelScope): kotlinx.coroutines.CoroutineScope declared in com.rickclephas.kmp.observableviewmodel' type=kotlinx.coroutines.CoroutineScope origin=null + ARG : CALL 'public final fun (): com.rickclephas.kmp.observableviewmodel.ViewModelScope declared in com.rickclephas.kmp.observableviewmodel.ViewModel' type=com.rickclephas.kmp.observableviewmodel.ViewModelScope origin=null + ARG : GET_VAR ': .MyObservableViewModel2 declared in .returnSuspendValue2Native' type=.MyObservableViewModel2 origin=null + RETURN type=kotlin.Nothing from='public final fun returnSuspendValue2Native (: .MyObservableViewModel2): kotlin.String declared in ' + CALL 'public final fun returnSuspendValue2 (: .MyObservableViewModel2): kotlin.String declared in ' type=kotlin.String origin=null + ARG : GET_VAR ': .MyObservableViewModel2 declared in .returnSuspendValue2Native' type=.MyObservableViewModel2 origin=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt new file mode 100644 index 00000000..3d09cffa --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt @@ -0,0 +1,227 @@ +// FILE: androidxviewmodel.kt +package androidx.lifecycle + +open class ViewModel { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +val ViewModel.viewModelScope: CoroutineScope + get(): CoroutineScope { + return CoroutineScope(context = Dispatchers.()) + } + +// FILE: observableviewmodel.kt +package com.rickclephas.kmp.observableviewmodel + +open class ViewModel : ViewModel { + val viewModelScope: ViewModelScope + field = ViewModelScope() + get + + constructor() /* primary */ { + super/*ViewModel*/() + /* () */ + + } + +} + +class ViewModelScope { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +val ViewModelScope.coroutineScope: CoroutineScope + get(): CoroutineScope { + return CoroutineScope(context = Dispatchers.()) + } + +// FILE: viewmodelscope.kt + +@NativeCoroutineScope +internal val unusedCoroutineScope: CoroutineScope + field = CoroutineScope(context = Dispatchers.()) + internal get + +class MyAndroidXViewModel1 : ViewModel { + constructor() /* primary */ { + super/*ViewModel*/() + /* () */ + + } + + @ObjCName(name = "returnSuspendValue1") + suspend fun returnSuspendValue1Native(): String { + val tmp_0: CoroutineScope = (/* = */) + return .returnSuspendValue1() + } + + @NativeCoroutines + suspend fun returnSuspendValue1(): String { + return "OK1" + } + +} + +class MyAndroidXViewModel2 : ViewModel { + @NativeCoroutineScope + internal val customCoroutineScope: CoroutineScope + field = CoroutineScope(context = Dispatchers.()) + internal get + + constructor() /* primary */ { + super/*ViewModel*/() + /* () */ + + } + + @ObjCName(name = "returnSuspendValue1") + suspend fun returnSuspendValue1Native(): String { + val tmp_1: CoroutineScope = .() + return .returnSuspendValue1() + } + + @NativeCoroutines + suspend fun returnSuspendValue1(): String { + return "OK5" + } + +} + +class MyObservableViewModel1 : ViewModel { + constructor() /* primary */ { + super/*ViewModel*/() + /* () */ + + } + + @ObjCName(name = "returnSuspendValue1") + suspend fun returnSuspendValue1Native(): String { + val tmp_2: CoroutineScope = (/* = .() */) + return .returnSuspendValue1() + } + + @NativeCoroutines + suspend fun returnSuspendValue1(): String { + return "OK3" + } + +} + +class MyObservableViewModel2 : ViewModel { + @NativeCoroutineScope + internal val customCoroutineScope: CoroutineScope + field = CoroutineScope(context = Dispatchers.()) + internal get + + constructor() /* primary */ { + super/*ViewModel*/() + /* () */ + + } + + @ObjCName(name = "returnSuspendValue1") + suspend fun returnSuspendValue1Native(): String { + val tmp_3: CoroutineScope = .() + return .returnSuspendValue1() + } + + @NativeCoroutines + suspend fun returnSuspendValue1(): String { + return "OK7" + } + +} + +fun box(): String { + return runBoxTest(action = local suspend fun BoxTest.() { + $this$runBoxTest.await(result = local suspend fun (): String { + return MyAndroidXViewModel1().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendValue2Native(/* = MyAndroidXViewModel1() */) + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyObservableViewModel1().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendValue2Native(/* = MyObservableViewModel1() */) + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyAndroidXViewModel2().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendValue2Native(/* = MyAndroidXViewModel2() */) + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return MyObservableViewModel2().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(result = local suspend fun (): String { + return returnSuspendValue2Native(/* = MyObservableViewModel2() */) + } +) + } +) +} + +@NativeCoroutines +suspend fun MyAndroidXViewModel1.returnSuspendValue2(): String { + return "OK2" +} + +@NativeCoroutines +suspend fun MyAndroidXViewModel2.returnSuspendValue2(): String { + return "OK6" +} + +@NativeCoroutines +suspend fun MyObservableViewModel1.returnSuspendValue2(): String { + return "OK4" +} + +@NativeCoroutines +suspend fun MyObservableViewModel2.returnSuspendValue2(): String { + return "OK8" +} + +// FILE: __GENERATED DECLARATIONS__.kt + +@ObjCName(name = "returnSuspendValue2") +suspend fun MyAndroidXViewModel1.returnSuspendValue2Native(): String { + val tmp_0: CoroutineScope = (/* = */) + return returnSuspendValue2(/* = */) +} + +@ObjCName(name = "returnSuspendValue2") +suspend fun MyAndroidXViewModel2.returnSuspendValue2Native(): String { + val tmp_1: CoroutineScope = (/* = */) + return returnSuspendValue2(/* = */) +} + +@ObjCName(name = "returnSuspendValue2") +suspend fun MyObservableViewModel1.returnSuspendValue2Native(): String { + val tmp_2: CoroutineScope = (/* = .() */) + return returnSuspendValue2(/* = */) +} + +@ObjCName(name = "returnSuspendValue2") +suspend fun MyObservableViewModel2.returnSuspendValue2Native(): String { + val tmp_3: CoroutineScope = (/* = .() */) + return returnSuspendValue2(/* = */) +} diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt new file mode 100644 index 00000000..9498e40f --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt @@ -0,0 +1,170 @@ +FILE: androidxviewmodel.kt + package androidx.lifecycle + + public open class ViewModel : R|kotlin/Any| { + public constructor(): R|androidx/lifecycle/ViewModel| { + super() + } + + } + public final val R|androidx/lifecycle/ViewModel|.viewModelScope: R|kotlinx/coroutines/CoroutineScope| + public get(): R|kotlinx/coroutines/CoroutineScope| { + ^ R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + } +FILE: observableviewmodel.kt + package com.rickclephas.kmp.observableviewmodel + + public final class ViewModelScope : R|kotlin/Any| { + public constructor(): R|com/rickclephas/kmp/observableviewmodel/ViewModelScope| { + super() + } + + } + public final val R|com/rickclephas/kmp/observableviewmodel/ViewModelScope|.coroutineScope: R|kotlinx/coroutines/CoroutineScope| + public get(): R|kotlinx/coroutines/CoroutineScope| { + ^ R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + } + public open class ViewModel : R|androidx/lifecycle/ViewModel| { + public constructor(): R|com/rickclephas/kmp/observableviewmodel/ViewModel| { + super() + } + + public final val viewModelScope: R|com/rickclephas/kmp/observableviewmodel/ViewModelScope| = R|com/rickclephas/kmp/observableviewmodel/ViewModelScope.ViewModelScope|() + public get(): R|com/rickclephas/kmp/observableviewmodel/ViewModelScope| + + } +FILE: viewmodelscope.kt + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutineScope|() internal final val unusedCoroutineScope: R|kotlinx/coroutines/CoroutineScope| = R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + internal get(): R|kotlinx/coroutines/CoroutineScope| + public final class MyAndroidXViewModel1 : R|androidx/lifecycle/ViewModel| { + public constructor(): R|MyAndroidXViewModel1| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue1(): R|kotlin/String| { + ^returnSuspendValue1 String(OK1) + } + + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + ::R|/MyAndroidXViewModel1.returnSuspendValue1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|MyAndroidXViewModel1|.returnSuspendValue2(): R|kotlin/String| { + ^returnSuspendValue2 String(OK2) + } + public final class MyObservableViewModel1 : R|com/rickclephas/kmp/observableviewmodel/ViewModel| { + public constructor(): R|MyObservableViewModel1| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue1(): R|kotlin/String| { + ^returnSuspendValue1 String(OK3) + } + + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + ::R|/MyObservableViewModel1.returnSuspendValue1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|MyObservableViewModel1|.returnSuspendValue2(): R|kotlin/String| { + ^returnSuspendValue2 String(OK4) + } + public final class MyAndroidXViewModel2 : R|androidx/lifecycle/ViewModel| { + public constructor(): R|MyAndroidXViewModel2| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutineScope|() internal final val customCoroutineScope: R|kotlinx/coroutines/CoroutineScope| = R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + internal get(): R|kotlinx/coroutines/CoroutineScope| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue1(): R|kotlin/String| { + ^returnSuspendValue1 String(OK5) + } + + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + ::R|/MyAndroidXViewModel2.returnSuspendValue1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|MyAndroidXViewModel2|.returnSuspendValue2(): R|kotlin/String| { + ^returnSuspendValue2 String(OK6) + } + public final class MyObservableViewModel2 : R|com/rickclephas/kmp/observableviewmodel/ViewModel| { + public constructor(): R|MyObservableViewModel2| { + super() + } + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutineScope|() internal final val customCoroutineScope: R|kotlinx/coroutines/CoroutineScope| = R|kotlinx/coroutines/CoroutineScope|(Q|kotlinx/coroutines/Dispatchers|.R|kotlinx/coroutines/Dispatchers.Default|) + internal get(): R|kotlinx/coroutines/CoroutineScope| + + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun returnSuspendValue1(): R|kotlin/String| { + ^returnSuspendValue1 String(OK7) + } + + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + ::R|/MyObservableViewModel2.returnSuspendValue1| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + + } + @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public final suspend fun R|MyObservableViewModel2|.returnSuspendValue2(): R|kotlin/String| { + ^returnSuspendValue2 String(OK8) + } + public final fun box(): R|kotlin/String| { + ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyAndroidXViewModel1.MyAndroidXViewModel1|().R|/MyAndroidXViewModel1.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyAndroidXViewModel1.MyAndroidXViewModel1|().R|/returnSuspendValue2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyObservableViewModel1.MyObservableViewModel1|().R|/MyObservableViewModel1.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyObservableViewModel1.MyObservableViewModel1|().R|/returnSuspendValue2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyAndroidXViewModel2.MyAndroidXViewModel2|().R|/MyAndroidXViewModel2.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyAndroidXViewModel2.MyAndroidXViewModel2|().R|/returnSuspendValue2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyObservableViewModel2.MyObservableViewModel2|().R|/MyObservableViewModel2.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|kotlin/String| { + ^ R|/MyObservableViewModel2.MyObservableViewModel2|().R|/returnSuspendValue2Native|() + } + ) + } + ) + } +FILE: __GENERATED DECLARATIONS__.kt + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyAndroidXViewModel1|.returnSuspendValue2Native(): R|kotlin/String| { + ::R|/returnSuspendValue2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyObservableViewModel1|.returnSuspendValue2Native(): R|kotlin/String| { + ::R|/returnSuspendValue2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyAndroidXViewModel2|.returnSuspendValue2Native(): R|kotlin/String| { + ::R|/returnSuspendValue2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyObservableViewModel2|.returnSuspendValue2Native(): R|kotlin/String| { + ::R|/returnSuspendValue2| + R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) + } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.kt new file mode 120000 index 00000000..eb585a5e --- /dev/null +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.kt @@ -0,0 +1 @@ +../viewmodelscope.kt \ No newline at end of file diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.ir.txt index 2f9a2e1b..9d6b3e11 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.ir.txt @@ -331,46 +331,78 @@ FILE fqName: fileName:/viewmodelscope.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Unit [suspend] VALUE_PARAMETER kind:ExtensionReceiver name:$this$runBoxTest index:0 type:com.rickclephas.kmp.nativecoroutines.BoxTest BLOCK_BODY - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyAndroidXViewModel1' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel1' type=.MyAndroidXViewModel1 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyAndroidXViewModel1' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel1' type=.MyAndroidXViewModel1 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue2Native (: .MyAndroidXViewModel1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel1' type=.MyAndroidXViewModel1 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyAndroidXViewModel1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel1' type=.MyAndroidXViewModel1 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyObservableViewModel1' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel1' type=.MyObservableViewModel1 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyObservableViewModel1' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel1' type=.MyObservableViewModel1 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue2Native (: .MyObservableViewModel1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel1' type=.MyObservableViewModel1 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyObservableViewModel1): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel1' type=.MyObservableViewModel1 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyAndroidXViewModel2' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel2' type=.MyAndroidXViewModel2 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyAndroidXViewModel2' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel2' type=.MyAndroidXViewModel2 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue2Native (: .MyAndroidXViewModel2): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel2' type=.MyAndroidXViewModel2 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyAndroidXViewModel2): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyAndroidXViewModel2' type=.MyAndroidXViewModel2 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyObservableViewModel2' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel2' type=.MyObservableViewModel2 origin=null - CALL 'public final fun await (nativeSuspend: kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue1Native (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .MyObservableViewModel2' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel2' type=.MyObservableViewModel2 origin=null + CALL 'public final fun await (nativeSuspend: kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>>): kotlin.Unit declared in com.rickclephas.kmp.nativecoroutines.BoxTest' type=kotlin.Unit origin=null TYPE_ARG T: kotlin.String ARG : GET_VAR '$this$runBoxTest: com.rickclephas.kmp.nativecoroutines.BoxTest declared in .box.' type=com.rickclephas.kmp.nativecoroutines.BoxTest origin=IMPLICIT_ARGUMENT - ARG nativeSuspend: CALL 'public final fun returnSuspendValue2Native (: .MyObservableViewModel2): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null - ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel2' type=.MyObservableViewModel2 origin=null + ARG nativeSuspend: FUN_EXPR type=kotlin.Function0, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in .box.' + CALL 'public final fun returnSuspendValue2Native (: .MyObservableViewModel2): kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> declared in ' type=kotlin.Function3<@[ParameterName(name = "onResult")] kotlin.Function2, @[ParameterName(name = "onError")] kotlin.Function2, @[ParameterName(name = "onCancelled")] kotlin.Function2, kotlin.Function0> origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in .MyObservableViewModel2' type=.MyObservableViewModel2 origin=null FUN name:returnSuspendValue2 visibility:public modality:FINAL returnType:kotlin.String [suspend] VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyAndroidXViewModel1 annotations: diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.kt.txt index f2db14e7..fe6c6f78 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.kt.txt @@ -156,14 +156,38 @@ class MyObservableViewModel2 : ViewModel { fun box(): String { return runBoxTest(action = local suspend fun BoxTest.() { - $this$runBoxTest.await(nativeSuspend = MyAndroidXViewModel1().returnSuspendValue1Native()) - $this$runBoxTest.await(nativeSuspend = returnSuspendValue2Native(/* = MyAndroidXViewModel1() */)) - $this$runBoxTest.await(nativeSuspend = MyObservableViewModel1().returnSuspendValue1Native()) - $this$runBoxTest.await(nativeSuspend = returnSuspendValue2Native(/* = MyObservableViewModel1() */)) - $this$runBoxTest.await(nativeSuspend = MyAndroidXViewModel2().returnSuspendValue1Native()) - $this$runBoxTest.await(nativeSuspend = returnSuspendValue2Native(/* = MyAndroidXViewModel2() */)) - $this$runBoxTest.await(nativeSuspend = MyObservableViewModel2().returnSuspendValue1Native()) - $this$runBoxTest.await(nativeSuspend = returnSuspendValue2Native(/* = MyObservableViewModel2() */)) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyAndroidXViewModel1().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendValue2Native(/* = MyAndroidXViewModel1() */) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyObservableViewModel1().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendValue2Native(/* = MyObservableViewModel1() */) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyAndroidXViewModel2().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendValue2Native(/* = MyAndroidXViewModel2() */) + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return MyObservableViewModel2().returnSuspendValue1Native() + } +) + $this$runBoxTest.await(nativeSuspend = local fun (): Function3<@ParameterName(name = "onResult") Function2, @ParameterName(name = "onError") Function2, @ParameterName(name = "onCancelled") Function2, Function0> { + return returnSuspendValue2Native(/* = MyObservableViewModel2() */) + } +) } ) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.txt index 291d6c9f..85df6921 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.fir.txt @@ -116,14 +116,38 @@ FILE: viewmodelscope.kt } public final fun box(): R|kotlin/String| { ^box R|com/rickclephas/kmp/nativecoroutines/runBoxTest|( = runBoxTest@fun R|com/rickclephas/kmp/nativecoroutines/BoxTest|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyAndroidXViewModel1.MyAndroidXViewModel1|().R|/MyAndroidXViewModel1.returnSuspendValue1Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyAndroidXViewModel1.MyAndroidXViewModel1|().R|/returnSuspendValue2Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyObservableViewModel1.MyObservableViewModel1|().R|/MyObservableViewModel1.returnSuspendValue1Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyObservableViewModel1.MyObservableViewModel1|().R|/returnSuspendValue2Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyAndroidXViewModel2.MyAndroidXViewModel2|().R|/MyAndroidXViewModel2.returnSuspendValue1Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyAndroidXViewModel2.MyAndroidXViewModel2|().R|/returnSuspendValue2Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyObservableViewModel2.MyObservableViewModel2|().R|/MyObservableViewModel2.returnSuspendValue1Native|()) - this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|(R|/MyObservableViewModel2.MyObservableViewModel2|().R|/returnSuspendValue2Native|()) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyAndroidXViewModel1.MyAndroidXViewModel1|().R|/MyAndroidXViewModel1.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyAndroidXViewModel1.MyAndroidXViewModel1|().R|/returnSuspendValue2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyObservableViewModel1.MyObservableViewModel1|().R|/MyObservableViewModel1.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyObservableViewModel1.MyObservableViewModel1|().R|/returnSuspendValue2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyAndroidXViewModel2.MyAndroidXViewModel2|().R|/MyAndroidXViewModel2.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyAndroidXViewModel2.MyAndroidXViewModel2|().R|/returnSuspendValue2Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyObservableViewModel2.MyObservableViewModel2|().R|/MyObservableViewModel2.returnSuspendValue1Native|() + } + ) + this@R|special/anonymous|.R|com/rickclephas/kmp/nativecoroutines/BoxTest.await|( = await@fun (): R|{com/rickclephas/kmp/nativecoroutines/NativeSuspend=} ({@R|kotlin/ParameterName|(name = String(onResult)) com/rickclephas/kmp/nativecoroutines/NativeCallback=} @R|kotlin/ParameterName|(name = String(onResult)) kotlin/Function2, {@R|kotlin/ParameterName|(name = String(onError)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onError)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>, {@R|kotlin/ParameterName|(name = String(onCancelled)) com/rickclephas/kmp/nativecoroutines/NativeCallback<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable>=} @R|kotlin/ParameterName|(name = String(onCancelled)) kotlin/Function2<{com/rickclephas/kmp/nativecoroutines/NativeError=} kotlin/Throwable, kotlin/Unit, kotlin/Unit>) -> {com/rickclephas/kmp/nativecoroutines/NativeCancellable=} kotlin/Function0| { + ^ R|/MyObservableViewModel2.MyObservableViewModel2|().R|/returnSuspendValue2Native|() + } + ) } ) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.kt b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.kt index cbbfe4c9..dd10161f 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.kt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/viewmodelscope.kt @@ -78,12 +78,12 @@ class MyObservableViewModel2: com.rickclephas.kmp.observableviewmodel.ViewModel( suspend fun MyObservableViewModel2.returnSuspendValue2(): String = "OK8" fun box() = runBoxTest { - await(MyAndroidXViewModel1().returnSuspendValue1Native()) - await(MyAndroidXViewModel1().returnSuspendValue2Native()) - await(MyObservableViewModel1().returnSuspendValue1Native()) - await(MyObservableViewModel1().returnSuspendValue2Native()) - await(MyAndroidXViewModel2().returnSuspendValue1Native()) - await(MyAndroidXViewModel2().returnSuspendValue2Native()) - await(MyObservableViewModel2().returnSuspendValue1Native()) - await(MyObservableViewModel2().returnSuspendValue2Native()) + await { MyAndroidXViewModel1().returnSuspendValue1Native() } + await { MyAndroidXViewModel1().returnSuspendValue2Native() } + await { MyObservableViewModel1().returnSuspendValue1Native() } + await { MyObservableViewModel1().returnSuspendValue2Native() } + await { MyAndroidXViewModel2().returnSuspendValue1Native() } + await { MyAndroidXViewModel2().returnSuspendValue2Native() } + await { MyObservableViewModel2().returnSuspendValue1Native() } + await { MyObservableViewModel2().returnSuspendValue2Native() } } diff --git a/kmp-nativecoroutines-core/src/compilerTestMain/kotlin/com/rickclephas/kmp/nativecoroutines/BoxTest.kt b/kmp-nativecoroutines-core/src/compilerTestMain/kotlin/com/rickclephas/kmp/nativecoroutines/BoxTest.kt index 64353757..1001ac0e 100644 --- a/kmp-nativecoroutines-core/src/compilerTestMain/kotlin/com/rickclephas/kmp/nativecoroutines/BoxTest.kt +++ b/kmp-nativecoroutines-core/src/compilerTestMain/kotlin/com/rickclephas/kmp/nativecoroutines/BoxTest.kt @@ -1,9 +1,12 @@ package com.rickclephas.kmp.nativecoroutines import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.flow.* +import kotlin.coroutines.cancellation.CancellationException import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine +import kotlin.experimental.ExperimentalTypeInference public class BoxTest internal constructor() { @@ -36,9 +39,29 @@ public class BoxTest internal constructor() { resultBuilder.appendLine() } - public suspend fun await(nativeSuspend: NativeSuspend) { + public suspend fun collect(flow: Flow, maxValues: Int? = null) { + try { + var valueCount = 0 + flow.collect { value -> + if (valueCount != 0) resultBuilder.append(",") + resultBuilder.append(value) + if (++valueCount == maxValues) { + throw CancellationException() + } + } + } catch (_: CancellationException) { + resultBuilder.append(";") + } catch (e: Throwable) { + resultBuilder.append(";$e") + } + resultBuilder.appendLine() + } + + @OptIn(ExperimentalTypeInference::class) + @OverloadResolutionByLambdaReturnType + public suspend fun await(nativeSuspend: () -> NativeSuspend) { suspendCoroutine { cont -> - nativeSuspend({ result, _ -> + nativeSuspend()({ result, _ -> resultBuilder.append(result) cont.resume(Unit) }, { error, _ -> @@ -52,12 +75,27 @@ public class BoxTest internal constructor() { resultBuilder.appendLine() } + @OptIn(ExperimentalTypeInference::class) + @OverloadResolutionByLambdaReturnType + public suspend fun await(result: suspend () -> T) { + try { + resultBuilder.append(result()) + } catch (_: CancellationException) { + resultBuilder.append(";") + } catch (e: Throwable) { + resultBuilder.append(";$e") + } + resultBuilder.appendLine() + } + + @OptIn(ExperimentalTypeInference::class) + @OverloadResolutionByLambdaReturnType public suspend fun awaitAndCollect( - nativeSuspendFlow: NativeSuspend>, - maxValues: Int? = null + maxValues: Int? = null, + nativeSuspend: () -> NativeSuspend> ) { val nativeFlow = suspendCoroutine> { cont -> - nativeSuspendFlow({ result, _ -> + nativeSuspend()({ result, _ -> cont.resume(result) }, { error, _ -> cont.resumeWithException(error) @@ -68,6 +106,31 @@ public class BoxTest internal constructor() { collect(nativeFlow, maxValues) } + @OptIn(ExperimentalTypeInference::class) + @OverloadResolutionByLambdaReturnType + public suspend fun awaitAndCollect( + maxValues: Int? = null, + flow: suspend () -> Flow + ) { + collect(flow(), maxValues) + } + + @OptIn(ExperimentalTypeInference::class) + @OverloadResolutionByLambdaReturnType + public suspend fun awaitAndCollectNull( + nativeSuspend: () -> NativeSuspend?> + ) { + await?>(nativeSuspend) + } + + @OptIn(ExperimentalTypeInference::class) + @OverloadResolutionByLambdaReturnType + public suspend fun awaitAndCollectNull( + flow: suspend () -> Flow? + ) { + await?>(flow) + } + public fun value(value: T) { resultBuilder.appendLine(value) } From dfde3133890eb52a9849bd7433a57f2605f2d41b Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 20:10:20 +0100 Subject: [PATCH 07/18] Update all build scripts with Swift export support --- .../project.pbxproj | 49 +++++++++++-------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj index d5da7d69..20c09f95 100644 --- a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj +++ b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj @@ -643,7 +643,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D63BF5E26E3E1DD003363BE /* Build configuration list for PBXNativeTarget "tvOS App" */; buildPhases = ( - 1DB9CD1D275E935100E13AFD /* ShellScript */, + 1DB9CD1D275E935100E13AFD /* Build shared Kotlin module */, 1D63BF2F26E3E1DB003363BE /* Sources */, 1D63BF3026E3E1DB003363BE /* Frameworks */, 1D63BF3126E3E1DB003363BE /* Resources */, @@ -667,7 +667,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D63BF5F26E3E1DD003363BE /* Build configuration list for PBXNativeTarget "tvOS Tests" */; buildPhases = ( - 1DB9CD21275E95D200E13AFD /* ShellScript */, + 1DB9CD21275E95D200E13AFD /* Build shared Kotlin module */, 1D63BF4226E3E1DD003363BE /* Sources */, 1D63BF4326E3E1DD003363BE /* Frameworks */, 1D63BF4426E3E1DD003363BE /* Resources */, @@ -728,7 +728,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D63BFBA26E4F00A003363BE /* Build configuration list for PBXNativeTarget "watchOS App WatchKit Extension" */; buildPhases = ( - 1DB9CD1E275E937500E13AFD /* ShellScript */, + 1DB9CD1E275E937500E13AFD /* Build shared Kotlin module */, 1D63BF8126E4F009003363BE /* Sources */, 1D63BF8226E4F009003363BE /* Frameworks */, 1D63BF8326E4F009003363BE /* Resources */, @@ -752,7 +752,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D63BFBD26E4F00A003363BE /* Build configuration list for PBXNativeTarget "watchOS Tests" */; buildPhases = ( - 1DB9CD22275E95DA00E13AFD /* ShellScript */, + 1DB9CD22275E95DA00E13AFD /* Build shared Kotlin module */, 1D63BF9826E4F00A003363BE /* Sources */, 1D63BF9926E4F00A003363BE /* Frameworks */, 1D63BF9A26E4F00A003363BE /* Resources */, @@ -777,7 +777,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D71760C267009C600846F75 /* Build configuration list for PBXNativeTarget "macOS App" */; buildPhases = ( - 1D5CF257275E887D002389EE /* ShellScript */, + 1D5CF257275E887D002389EE /* Build shared Kotlin module */, 1D7175F8267009C500846F75 /* Sources */, 1D7175F9267009C500846F75 /* Frameworks */, 1D7175FA267009C500846F75 /* Resources */, @@ -825,7 +825,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D81B1422677B72200EEC34D /* Build configuration list for PBXNativeTarget "macOS Tests" */; buildPhases = ( - 1DB9CD20275E95CA00E13AFD /* ShellScript */, + 1DB9CD20275E95CA00E13AFD /* Build shared Kotlin module */, 1D81B1372677B72200EEC34D /* Sources */, 1D81B1382677B72200EEC34D /* Frameworks */, 1D81B1392677B72200EEC34D /* Resources */, @@ -850,7 +850,7 @@ isa = PBXNativeTarget; buildConfigurationList = 1D81B1502677B7C000EEC34D /* Build configuration list for PBXNativeTarget "iOS Tests" */; buildPhases = ( - 1DB9CD1F275E95A800E13AFD /* ShellScript */, + 1DB9CD1F275E95A800E13AFD /* Build shared Kotlin module */, 1D81B1452677B7C000EEC34D /* Sources */, 1D81B1462677B7C000EEC34D /* Frameworks */, 1D81B1472677B7C000EEC34D /* Resources */, @@ -1026,7 +1026,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1D5CF257275E887D002389EE /* ShellScript */ = { + 1D5CF257275E887D002389EE /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1036,13 +1036,14 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; 1D5CF258275E8992002389EE /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; @@ -1063,7 +1064,7 @@ shellPath = /bin/sh; shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; - 1DB9CD1D275E935100E13AFD /* ShellScript */ = { + 1DB9CD1D275E935100E13AFD /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1073,15 +1074,16 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; - 1DB9CD1E275E937500E13AFD /* ShellScript */ = { + 1DB9CD1E275E937500E13AFD /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1091,15 +1093,16 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; - 1DB9CD1F275E95A800E13AFD /* ShellScript */ = { + 1DB9CD1F275E95A800E13AFD /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1109,15 +1112,16 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; - 1DB9CD20275E95CA00E13AFD /* ShellScript */ = { + 1DB9CD20275E95CA00E13AFD /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1127,15 +1131,16 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; - 1DB9CD21275E95D200E13AFD /* ShellScript */ = { + 1DB9CD21275E95D200E13AFD /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1145,15 +1150,16 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; - 1DB9CD22275E95DA00E13AFD /* ShellScript */ = { + 1DB9CD22275E95DA00E13AFD /* Build shared Kotlin module */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1163,13 +1169,14 @@ ); inputPaths = ( ); + name = "Build shared Kotlin module"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT\"\nif [ \"$NATIVE_COROUTINES_SWIFT_EXPORT\" == \"true\" ]; then\n./gradlew :shared:embedSwiftExportForXcode\nelse\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ From f53ab060f2b730133a78fc980a8491f0c10f6786 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 1 Nov 2025 21:46:10 +0100 Subject: [PATCH 08/18] Fix reference to SuspendIntegrationTests --- sample/Async/SwiftUIAsyncTest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/Async/SwiftUIAsyncTest.swift b/sample/Async/SwiftUIAsyncTest.swift index 41e35e95..5dbdb805 100644 --- a/sample/Async/SwiftUIAsyncTest.swift +++ b/sample/Async/SwiftUIAsyncTest.swift @@ -12,7 +12,7 @@ import KMPNativeCoroutinesAsync @available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) struct SwiftUIAsyncTest: View { - var tests: SuspendIntegrationTests + var tests: KotlinSuspendIntegrationTests var body: some View { List { From be3811b2a8a2b8d78634d85fb11c9a9973e9ab5d Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Mon, 3 Nov 2025 21:05:32 +0100 Subject: [PATCH 09/18] Add Throws annotation to generated suspend functions --- .../compiler/fir/codegen/Annotations.kt | 40 +++++++++++++++++++ .../compiler/fir/codegen/NativeFunction.kt | 3 ++ .../compiler/utils/ClassIds.kt | 2 + .../compiler/utils/FqNames.kt | 2 + .../nativecoroutines/compiler/utils/Names.kt | 3 ++ .../codegen/swift1/annotations.fir.ir.txt | 7 ++++ .../codegen/swift1/annotations.fir.kt.txt | 7 ++++ .../codegen/swift1/annotations.fir.txt | 14 +++---- .../codegen/swift1/coroutinescope.fir.ir.txt | 11 +++++ .../codegen/swift1/coroutinescope.fir.kt.txt | 8 ++++ .../codegen/swift1/coroutinescope.fir.txt | 16 ++++---- .../codegen/swift1/functions.fir.ir.txt | 19 +++++++++ .../codegen/swift1/functions.fir.kt.txt | 18 +++++++++ .../testData/codegen/swift1/functions.fir.txt | 36 ++++++++--------- .../codegen/swift1/viewmodelscope.fir.ir.txt | 8 ++++ .../codegen/swift1/viewmodelscope.fir.kt.txt | 8 ++++ .../codegen/swift1/viewmodelscope.fir.txt | 16 ++++---- 17 files changed, 177 insertions(+), 41 deletions(-) diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/Annotations.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/Annotations.kt index 50cfb170..a9d00fc7 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/Annotations.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/Annotations.kt @@ -4,14 +4,22 @@ import com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.asFirExpression import com.rickclephas.kmp.nativecoroutines.compiler.utils.ClassIds import com.rickclephas.kmp.nativecoroutines.compiler.utils.Names import org.jetbrains.kotlin.fir.declarations.toAnnotationClassId +import org.jetbrains.kotlin.fir.declarations.utils.isCompanion import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.builder.buildAnnotation import org.jetbrains.kotlin.fir.expressions.builder.buildAnnotationArgumentMapping +import org.jetbrains.kotlin.fir.expressions.builder.buildArgumentList +import org.jetbrains.kotlin.fir.expressions.builder.buildGetClassCall +import org.jetbrains.kotlin.fir.expressions.builder.buildResolvedQualifier +import org.jetbrains.kotlin.fir.expressions.builder.buildVarargArgumentsExpression import org.jetbrains.kotlin.fir.extensions.FirExtension +import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider +import org.jetbrains.kotlin.fir.types.ConeKotlinTypeProjectionOut import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef import org.jetbrains.kotlin.fir.types.constructClassLikeType import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.name.StandardClassIds internal fun FirExtension.buildAnnotationsCopy( originalAnnotations: List, @@ -44,6 +52,38 @@ internal fun buildAnnotation( } } +internal fun FirExtension.buildThrowsAnnotation(vararg classIds: ClassId): FirAnnotation { + val exceptionClasses = classIds.mapNotNull { classId -> + session.symbolProvider.getClassLikeSymbolByClassId(classId) + }.map { symbol -> + buildResolvedQualifier { + coneTypeOrNull = symbol.classId.constructClassLikeType() + packageFqName = symbol.classId.packageFqName + relativeClassFqName = symbol.classId.relativeClassName + this.symbol = symbol + resolvedToCompanionObject = symbol.isCompanion + } + }.map { resolvedQualifier -> + buildGetClassCall { + coneTypeOrNull = StandardClassIds.KClass.constructClassLikeType(arrayOf( + resolvedQualifier.classId!!.constructClassLikeType() + )) + argumentList = buildArgumentList { + arguments.add(resolvedQualifier) + } + } + } + return buildAnnotation(ClassIds.throws, mapOf( + Names.Throws.exceptionClasses to buildVarargArgumentsExpression { + coneElementTypeOrNull = StandardClassIds.Throwable.constructClassLikeType() + coneTypeOrNull = StandardClassIds.Array.constructClassLikeType(arrayOf( + ConeKotlinTypeProjectionOut(coneElementTypeOrNull!!) + )) + arguments.addAll(exceptionClasses) + } + )) +} + private fun buildObjCNameAnnotationCopy( annotation: FirAnnotation?, objCName: String?, diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt index 0f3be28b..730eabb2 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/fir/codegen/NativeFunction.kt @@ -84,6 +84,9 @@ internal fun FirExtension.buildNativeFunction( if (annotation.shouldRefineInSwift) { annotations.add(buildAnnotation(ClassIds.shouldRefineInSwift)) } + if (SwiftExport.NO_FUNC_RETURN_TYPES in swiftExport && callableSignature.isSuspend) { + annotations.add(buildThrowsAnnotation(ClassIds.exception)) + } body = session.buildCallableReferenceBlock(originalSymbol) }.symbol diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/ClassIds.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/ClassIds.kt index cec9ae0a..ce3bbe09 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/ClassIds.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/ClassIds.kt @@ -4,6 +4,8 @@ import org.jetbrains.kotlin.name.ClassId internal object ClassIds { val deprecated = ClassId.topLevel(FqNames.deprecated) + val exception = ClassId.topLevel(FqNames.exception) + val throws = ClassId.topLevel(FqNames.throws) val hidesFromObjC = ClassId.topLevel(FqNames.hidesFromObjC) val objCName = ClassId.topLevel(FqNames.objCName) diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/FqNames.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/FqNames.kt index b90d47d7..de95db53 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/FqNames.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/FqNames.kt @@ -6,6 +6,8 @@ internal object FqNames { val kotlin = FqName("kotlin") val deprecated = FqName("kotlin.Deprecated") + val exception = FqName("kotlin.Exception") + val throws = FqName("kotlin.Throws") val hidesFromObjC = FqName("kotlin.native.HidesFromObjC") val objCName = FqName("kotlin.native.ObjCName") diff --git a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/Names.kt b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/Names.kt index 95271cf0..9555255c 100644 --- a/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/Names.kt +++ b/kmp-nativecoroutines-compiler/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/utils/Names.kt @@ -8,6 +8,9 @@ internal object Names { val replaceWith = Name.identifier("replaceWith") val level = Name.identifier("level") } + object Throws { + val exceptionClasses = Name.identifier("exceptionClasses") + } object ObjCName { val name = Name.identifier("name") val swiftName = Name.identifier("swiftName") diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt index c42ad0ad..4abbfdc8 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.ir.txt @@ -262,6 +262,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt annotations: Deprecated(message = "This is deprecated 1", replaceWith = , level = ) ObjCName(name = "deprecatedFunction1", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -271,6 +272,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt annotations: Deprecated(message = "This is deprecated 2", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:WARNING' type=kotlin.DeprecationLevel) ObjCName(name = "deprecatedFunction2", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -280,6 +282,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt annotations: Deprecated(message = "This is deprecated 3", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:ERROR' type=kotlin.DeprecationLevel) ObjCName(name = "deprecatedFunction3", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -288,6 +291,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameFunction1Native visibility:public modality:FINAL returnType:kotlin.String [suspend] annotations: ObjCName(name = "objCNameFunction1ObjC", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -296,6 +300,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameFunction2Native visibility:public modality:FINAL returnType:kotlin.String [suspend] annotations: ObjCName(name = "objCNameFunction2", swiftName = "objCNameFunction2Swift", exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -304,6 +309,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:objCNameFunction3Native visibility:public modality:FINAL returnType:kotlin.String [suspend] annotations: ObjCName(name = "objCNameFunction3ObjC", swiftName = "objCNameFunction3Swift", exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -315,6 +321,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt ObjCName(name = "valueObjC", swiftName = , exact = ) annotations: ObjCName(name = "objCNameFunctionParameter", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt index e4f211c7..d4ac43dd 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.kt.txt @@ -137,6 +137,7 @@ var deprecatedProperty4Value: String @Deprecated(message = "This is deprecated 1") @ObjCName(name = "deprecatedFunction1") +@Throws(exceptionClasses = [Exception::class]) suspend fun deprecatedFunction1Native(): String { val tmp_1: CoroutineScope? = null return deprecatedFunction1() @@ -144,6 +145,7 @@ suspend fun deprecatedFunction1Native(): String { @Deprecated(message = "This is deprecated 2", level = DeprecationLevel.WARNING) @ObjCName(name = "deprecatedFunction2") +@Throws(exceptionClasses = [Exception::class]) suspend fun deprecatedFunction2Native(): String { val tmp_2: CoroutineScope? = null return deprecatedFunction2() @@ -151,30 +153,35 @@ suspend fun deprecatedFunction2Native(): String { @Deprecated(message = "This is deprecated 3", level = DeprecationLevel.ERROR) @ObjCName(name = "deprecatedFunction3") +@Throws(exceptionClasses = [Exception::class]) suspend fun deprecatedFunction3Native(): String { val tmp_3: CoroutineScope? = null return deprecatedFunction3() } @ObjCName(name = "objCNameFunction1ObjC") +@Throws(exceptionClasses = [Exception::class]) suspend fun objCNameFunction1Native(): String { val tmp_4: CoroutineScope? = null return objCNameFunction1() } @ObjCName(name = "objCNameFunction2", swiftName = "objCNameFunction2Swift") +@Throws(exceptionClasses = [Exception::class]) suspend fun objCNameFunction2Native(): String { val tmp_5: CoroutineScope? = null return objCNameFunction2() } @ObjCName(name = "objCNameFunction3ObjC", swiftName = "objCNameFunction3Swift") +@Throws(exceptionClasses = [Exception::class]) suspend fun objCNameFunction3Native(): String { val tmp_6: CoroutineScope? = null return objCNameFunction3() } @ObjCName(name = "objCNameFunctionParameter") +@Throws(exceptionClasses = [Exception::class]) suspend fun objCNameFunctionParameterNative(@ObjCName(name = "valueObjC") value: String): String { val tmp_7: CoroutineScope? = null return objCNameFunctionParameter(value = value) diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt index 70de248b..d47c6106 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/annotations.fir.txt @@ -71,15 +71,15 @@ FILE: annotations.kt ) } FILE: __GENERATED DECLARATIONS__.kt - @R|kotlin/Deprecated|(message = String(This is deprecated 1)) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction1)) public final suspend fun deprecatedFunction1Native(): R|kotlin/String| { + @R|kotlin/Deprecated|(message = String(This is deprecated 1)) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction1)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun deprecatedFunction1Native(): R|kotlin/String| { ::R|/deprecatedFunction1| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/Deprecated|(message = String(This is deprecated 2), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.WARNING|) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction2)) public final suspend fun deprecatedFunction2Native(): R|kotlin/String| { + @R|kotlin/Deprecated|(message = String(This is deprecated 2), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.WARNING|) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction2)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun deprecatedFunction2Native(): R|kotlin/String| { ::R|/deprecatedFunction2| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/Deprecated|(message = String(This is deprecated 3), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.ERROR|) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction3)) public final suspend fun deprecatedFunction3Native(): R|kotlin/String| { + @R|kotlin/Deprecated|(message = String(This is deprecated 3), level = Q|kotlin/DeprecationLevel|.R|kotlin/DeprecationLevel.ERROR|) @R|kotlin/native/ObjCName|(name = String(deprecatedFunction3)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun deprecatedFunction3Native(): R|kotlin/String| { ::R|/deprecatedFunction3| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -109,15 +109,15 @@ FILE: __GENERATED DECLARATIONS__.kt R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @R|kotlin/Deprecated|(message = String(This is deprecated 7)) public set(value: R|kotlin/String|): R|kotlin/Unit| - @R|kotlin/native/ObjCName|(name = String(objCNameFunction1ObjC)) public final suspend fun objCNameFunction1Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(objCNameFunction1ObjC)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun objCNameFunction1Native(): R|kotlin/String| { ::R|/objCNameFunction1| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(objCNameFunction2), swiftName = String(objCNameFunction2Swift)) public final suspend fun objCNameFunction2Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(objCNameFunction2), swiftName = String(objCNameFunction2Swift)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun objCNameFunction2Native(): R|kotlin/String| { ::R|/objCNameFunction2| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(objCNameFunction3ObjC), swiftName = String(objCNameFunction3Swift)) public final suspend fun objCNameFunction3Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(objCNameFunction3ObjC), swiftName = String(objCNameFunction3Swift)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun objCNameFunction3Native(): R|kotlin/String| { ::R|/objCNameFunction3| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -131,7 +131,7 @@ FILE: __GENERATED DECLARATIONS__.kt ::R|/objCNameProperty1| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(objCNameFunctionParameter)) public final suspend fun objCNameFunctionParameterNative(@R|kotlin/native/ObjCName|(name = String(valueObjC)) value: R|kotlin/String|): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(objCNameFunctionParameter)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun objCNameFunctionParameterNative(@R|kotlin/native/ObjCName|(name = String(valueObjC)) value: R|kotlin/String|): R|kotlin/String| { ::R|/objCNameFunctionParameter| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt index 34bf4998..78383af0 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.ir.txt @@ -63,6 +63,7 @@ FILE fqName: fileName:/coroutinescope1.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope [val] CALL 'protected final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass1' type=kotlinx.coroutines.CoroutineScope origin=null @@ -117,6 +118,7 @@ FILE fqName: fileName:/coroutinescope1.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) overridden: public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] @@ -186,6 +188,7 @@ FILE fqName: fileName:/coroutinescope1.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass1 annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) overridden: public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass1 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] @@ -196,6 +199,7 @@ FILE fqName: fileName:/coroutinescope1.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass3 annotations: ObjCName(name = "returnOtherSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope [val] CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass3' type=kotlinx.coroutines.CoroutineScope origin=null @@ -244,6 +248,7 @@ FILE fqName: fileName:/coroutinescope1.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:.MyClass1 annotations: ObjCName(name = "returnExtSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope [val] CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' type=kotlinx.coroutines.CoroutineScope origin=null @@ -301,6 +306,7 @@ FILE fqName: fileName:/coroutinescope2.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:.MyClass1 annotations: ObjCName(name = "returnExtSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -354,6 +360,7 @@ FILE fqName: fileName:/coroutinescope2.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass6 annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] CALL 'private final fun (): kotlinx.coroutines.CoroutineScope declared in .MyClass6' type=kotlinx.coroutines.CoroutineScope origin=null @@ -393,6 +400,7 @@ FILE fqName: fileName:/coroutinescope2.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass6 annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) overridden: public final fun returnSuspendValueNative (): kotlin.String declared in .MyClass6 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] @@ -403,6 +411,7 @@ FILE fqName: fileName:/coroutinescope2.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass7 annotations: ObjCName(name = "returnOtherSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -555,6 +564,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyClass6 annotations: ObjCName(name = "returnExtSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -564,6 +574,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in ' type=kotlinx.coroutines.CoroutineScope origin=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt index 9f79869b..69e7c51d 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.kt.txt @@ -23,6 +23,7 @@ open class MyClass1 { } @ObjCName(name = "returnSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValueNative(): String { val tmp_0: CoroutineScope = .() return .returnSuspendValue() @@ -69,6 +70,7 @@ class MyClass3 : MyClass1 { } @ObjCName(name = "returnOtherSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnOtherSuspendValueNative(): String { val tmp_2: CoroutineScope = .() return .returnOtherSuspendValue() @@ -89,6 +91,7 @@ class MyClass4 { } @ObjCName(name = "returnExtSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun MyClass1.returnExtSuspendValueNative(): String { val tmp_3: CoroutineScope = () return .returnExtSuspendValue(/* = */) @@ -122,6 +125,7 @@ class MyClass5 { } @ObjCName(name = "returnExtSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun MyClass1.returnExtSuspendValueNative(): String { val tmp_0: CoroutineScope? = null return .returnExtSuspendValue(/* = */) @@ -147,6 +151,7 @@ open class MyClass6 { } @ObjCName(name = "returnSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValueNative(): String { val tmp_1: CoroutineScope = .() return .returnSuspendValue() @@ -167,6 +172,7 @@ class MyClass7 : MyClass6 { } @ObjCName(name = "returnOtherSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnOtherSuspendValueNative(): String { val tmp_2: CoroutineScope? = null return .returnOtherSuspendValue() @@ -241,12 +247,14 @@ val MyClass3.flowExtProperty2: Flow // FILE: __GENERATED DECLARATIONS__.kt @ObjCName(name = "returnExtSuspendValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun MyClass6.returnExtSuspendValueNative(): String { val tmp_0: CoroutineScope? = null return returnExtSuspendValue(/* = */) } @ObjCName(name = "returnSuspendValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValueNative(): String { val tmp_1: CoroutineScope = () return returnSuspendValue() diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt index e8eff001..5a7d4e16 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/coroutinescope.fir.txt @@ -18,7 +18,7 @@ FILE: coroutinescope1.kt ^returnSuspendValue String(OK3) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { ::R|/MyClass1.returnSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -51,7 +51,7 @@ FILE: coroutinescope1.kt ^returnOtherSuspendValue String(OK5) } - @R|kotlin/native/ObjCName|(name = String(returnOtherSuspendValue)) public final suspend fun returnOtherSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnOtherSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnOtherSuspendValueNative(): R|kotlin/String| { ::R|/MyClass3.returnOtherSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -70,7 +70,7 @@ FILE: coroutinescope1.kt ^returnExtSuspendValue String(OK7) } - @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) public final suspend fun R|MyClass1|.returnExtSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|MyClass1|.returnExtSuspendValueNative(): R|kotlin/String| { ::R|/MyClass4.returnExtSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -90,7 +90,7 @@ FILE: coroutinescope2.kt ^returnExtSuspendValue String(OK9) } - @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) public final suspend fun R|MyClass1|.returnExtSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|MyClass1|.returnExtSuspendValueNative(): R|kotlin/String| { ::R|/MyClass5.returnExtSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -108,7 +108,7 @@ FILE: coroutinescope2.kt ^returnSuspendValue String(OK10) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { ::R|/MyClass6.returnSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -126,7 +126,7 @@ FILE: coroutinescope2.kt ^returnOtherSuspendValue String(OK12) } - @R|kotlin/native/ObjCName|(name = String(returnOtherSuspendValue)) public final suspend fun returnOtherSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnOtherSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnOtherSuspendValueNative(): R|kotlin/String| { ::R|/MyClass7.returnOtherSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -180,7 +180,7 @@ FILE: coroutinescope2.kt ) } FILE: __GENERATED DECLARATIONS__.kt - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { ::R|/returnSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -199,7 +199,7 @@ FILE: __GENERATED DECLARATIONS__.kt ::R|/flowExtProperty2| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) public final suspend fun R|MyClass6|.returnExtSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnExtSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|MyClass6|.returnExtSuspendValueNative(): R|kotlin/String| { ::R|/returnExtSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt index a7e0294e..711853f8 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.ir.txt @@ -35,6 +35,7 @@ FILE fqName: fileName:/functions.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass14.MyClass14> annotations: ObjCName(name = "returnGenericSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -76,6 +77,7 @@ FILE fqName: fileName:/functions.kt VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value2 index:2 type:T2 of .MyClass16.functionWithGenericValuesNative annotations: ObjCName(name = "functionWithGenericValues", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -125,6 +127,7 @@ FILE fqName: fileName:/functions.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:1 type:kotlin.String annotations: ObjCName(name = "returnClassExtensionValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -164,6 +167,7 @@ FILE fqName: fileName:/functions.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass21.MyClass21> annotations: ObjCName(name = "returnGenericValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -196,6 +200,7 @@ FILE fqName: fileName:/functions.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface22 annotations: ObjCName(name = "returnInterfaceSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) overridden: public open fun returnInterfaceSuspendValueNative (): kotlin.String declared in .MyInterface22 FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] @@ -234,6 +239,7 @@ FILE fqName: fileName:/functions.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyClass8 annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -304,6 +310,7 @@ FILE fqName: fileName:/functions.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyInterface22 annotations: ObjCName(name = "returnInterfaceSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -665,6 +672,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:kotlin.String annotations: ObjCName(name = "returnExtensionValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -684,6 +692,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:T of .returnGenericSuspendValueNative annotations: ObjCName(name = "returnGenericSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -696,6 +705,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:T of .returnInlineSuspendValueNative annotations: ObjCName(name = "returnInlineSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -730,6 +740,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnNullableSuspendFlowNative visibility:public modality:FINAL returnType:kotlinx.coroutines.flow.Flow? [suspend] annotations: ObjCName(name = "returnNullableSuspendFlow", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -738,6 +749,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnNullableSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String? [suspend] annotations: ObjCName(name = "returnNullableSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -747,6 +759,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt annotations: ObjCName(name = "returnRefinedSuspendValue", swiftName = , exact = ) ShouldRefineInSwift + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -764,6 +777,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt annotations: ObjCName(name = "returnSuspendFlowValue", swiftName = , exact = ) ShouldRefineInSwift + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -773,6 +787,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.Int annotations: ObjCName(name = "returnSuspendParameterValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -783,6 +798,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:value index:0 type:kotlin.String annotations: ObjCName(name = "returnSuspendParameterValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -792,6 +808,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] annotations: ObjCName(name = "returnSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -801,6 +818,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] kind:Regular name:values index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] annotations: ObjCName(name = "returnSuspendVarargValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null @@ -810,6 +828,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt FUN GENERATED[com.rickclephas.kmp.nativecoroutines.compiler.fir.utils.NativeCoroutinesDeclarationKey] name:returnThrowsSuspendValueNative visibility:public modality:FINAL returnType:kotlin.String [suspend] annotations: ObjCName(name = "returnThrowsSuspendValue", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlinx.coroutines.CoroutineScope? [val] CONST Null type=kotlinx.coroutines.CoroutineScope? value=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt index 4b698753..dd86bdf4 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.kt.txt @@ -12,6 +12,7 @@ class MyClass14 { } @ObjCName(name = "returnGenericSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnGenericSuspendValueNative(): T { val tmp_0: CoroutineScope? = null return .returnGenericSuspendValue() @@ -32,6 +33,7 @@ class MyClass16 { } @ObjCName(name = "functionWithGenericValues") + @Throws(exceptionClasses = [Exception::class]) suspend fun functionWithGenericValuesNative(value1: T1, value2: T2): String { val tmp_1: CoroutineScope? = null return .functionWithGenericValues(value1 = value1, value2 = value2) @@ -52,6 +54,7 @@ class MyClass20 { } @ObjCName(name = "returnClassExtensionValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun String.returnClassExtensionValueNative(): String { val tmp_2: CoroutineScope? = null return .returnClassExtensionValue(/* = */) @@ -72,6 +75,7 @@ class MyClass21 { } @ObjCName(name = "returnGenericValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnGenericValueNative(): T? { val tmp_3: CoroutineScope? = null return .returnGenericValue() @@ -106,6 +110,7 @@ class MyClass8 { } @ObjCName(name = "returnSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValueNative(): String { val tmp_4: CoroutineScope? = null return .returnSuspendValue() @@ -134,6 +139,7 @@ class MyFlow23 : Flow { interface MyInterface22 { @ObjCName(name = "returnInterfaceSuspendValue") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnInterfaceSuspendValueNative(): String { val tmp_5: CoroutineScope? = null return .returnInterfaceSuspendValue() @@ -330,6 +336,7 @@ fun returnCustomFlowValueNative(): MyFlow23 { } @ObjCName(name = "returnExtensionValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun String.returnExtensionValueNative(): String { val tmp_1: CoroutineScope? = null return returnExtensionValue(/* = */) @@ -342,12 +349,14 @@ fun returnFlowValueNative(): Flow { } @ObjCName(name = "returnGenericSuspendValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnGenericSuspendValueNative(value: T): T { val tmp_3: CoroutineScope? = null return returnGenericSuspendValue(value = value) } @ObjCName(name = "returnInlineSuspendValue") +@Throws(exceptionClasses = [Exception::class]) suspend inline fun returnInlineSuspendValueNative(value: T): T { val tmp_4: CoroutineScope? = null return returnInlineSuspendValue(value = value) @@ -372,12 +381,14 @@ fun returnNullableFlowValueNative(): Flow { } @ObjCName(name = "returnNullableSuspendFlow") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnNullableSuspendFlowNative(): Flow? { val tmp_8: CoroutineScope? = null return returnNullableSuspendFlow() } @ObjCName(name = "returnNullableSuspendValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnNullableSuspendValueNative(): String? { val tmp_9: CoroutineScope? = null return returnNullableSuspendValue() @@ -385,6 +396,7 @@ suspend fun returnNullableSuspendValueNative(): String? { @ObjCName(name = "returnRefinedSuspendValue") @ShouldRefineInSwift +@Throws(exceptionClasses = [Exception::class]) suspend fun returnRefinedSuspendValueNative(): String { val tmp_10: CoroutineScope? = null return returnRefinedSuspendValue() @@ -398,36 +410,42 @@ fun returnStateFlowValueNative(): StateFlow { @ObjCName(name = "returnSuspendFlowValue") @ShouldRefineInSwift +@Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendFlowValueNative(): Flow { val tmp_12: CoroutineScope? = null return returnSuspendFlowValue() } @ObjCName(name = "returnSuspendParameterValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendParameterValueNative(value: Int): Int { val tmp_13: CoroutineScope? = null return returnSuspendParameterValue(value = value) } @ObjCName(name = "returnSuspendParameterValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendParameterValueNative(value: String): String { val tmp_14: CoroutineScope? = null return returnSuspendParameterValue(value = value) } @ObjCName(name = "returnSuspendValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValueNative(): String { val tmp_15: CoroutineScope? = null return returnSuspendValue() } @ObjCName(name = "returnSuspendVarargValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendVarargValueNative(vararg values: String): String { val tmp_16: CoroutineScope? = null return returnSuspendVarargValue(values = values) } @ObjCName(name = "returnThrowsSuspendValue") +@Throws(exceptionClasses = [Exception::class]) suspend fun returnThrowsSuspendValueNative(): String { val tmp_17: CoroutineScope? = null return returnThrowsSuspendValue() diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt index c866853b..24476c35 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/functions.fir.txt @@ -29,7 +29,7 @@ FILE: functions.kt ^returnSuspendValue String(OK8) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { ::R|/MyClass8.returnSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -59,7 +59,7 @@ FILE: functions.kt ^returnGenericSuspendValue this@R|/MyClass14|.R|/MyClass14.value| } - @R|kotlin/native/ObjCName|(name = String(returnGenericSuspendValue)) public final suspend fun returnGenericSuspendValueNative(): R|T| { + @R|kotlin/native/ObjCName|(name = String(returnGenericSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnGenericSuspendValueNative(): R|T| { ::R|/MyClass14.returnGenericSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -83,7 +83,7 @@ FILE: functions.kt ^functionWithGenericValues R|/value1|.R|kotlin/toString|().R|kotlin/String.plus|(R|/value2|.R|kotlin/toString|()) } - @R|kotlin/native/ObjCName|(name = String(functionWithGenericValues)) public final suspend fun functionWithGenericValuesNative(value1: R|T1|, value2: R|T2|): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(functionWithGenericValues)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun functionWithGenericValuesNative(value1: R|T1|, value2: R|T2|): R|kotlin/String| { ::R|/MyClass16.functionWithGenericValues| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -107,7 +107,7 @@ FILE: functions.kt ^returnClassExtensionValue this@R|/MyClass20.returnClassExtensionValue| } - @R|kotlin/native/ObjCName|(name = String(returnClassExtensionValue)) public final suspend fun R|kotlin/String|.returnClassExtensionValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnClassExtensionValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|kotlin/String|.returnClassExtensionValueNative(): R|kotlin/String| { ::R|/MyClass20.returnClassExtensionValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -122,7 +122,7 @@ FILE: functions.kt ^returnGenericValue Null(null) } - @R|kotlin/native/ObjCName|(name = String(returnGenericValue)) public final suspend fun returnGenericValueNative(): R|T?| { + @R|kotlin/native/ObjCName|(name = String(returnGenericValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnGenericValueNative(): R|T?| { ::R|/MyClass21.returnGenericValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -131,7 +131,7 @@ FILE: functions.kt public abstract interface MyInterface22 : R|kotlin/Any| { @R|com/rickclephas/kmp/nativecoroutines/NativeCoroutines|() public abstract suspend fun returnInterfaceSuspendValue(): R|kotlin/String| - @R|kotlin/native/ObjCName|(name = String(returnInterfaceSuspendValue)) public open suspend fun returnInterfaceSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnInterfaceSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public open suspend fun returnInterfaceSuspendValueNative(): R|kotlin/String| { ::R|/MyInterface22.returnInterfaceSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -245,11 +245,11 @@ FILE: functions.kt ) } FILE: __GENERATED DECLARATIONS__.kt - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValueNative(): R|kotlin/String| { ::R|/returnSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnNullableSuspendValue)) public final suspend fun returnNullableSuspendValueNative(): R|kotlin/String?| { + @R|kotlin/native/ObjCName|(name = String(returnNullableSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnNullableSuspendValueNative(): R|kotlin/String?| { ::R|/returnNullableSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -273,35 +273,35 @@ FILE: __GENERATED DECLARATIONS__.kt ::R|/returnStateFlowValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendParameterValue)) public final suspend fun returnSuspendParameterValueNative(value: R|kotlin/String|): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendParameterValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendParameterValueNative(value: R|kotlin/String|): R|kotlin/String| { ::R|/returnSuspendParameterValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendParameterValue)) public final suspend fun returnSuspendParameterValueNative(value: R|kotlin/Int|): R|kotlin/Int| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendParameterValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendParameterValueNative(value: R|kotlin/Int|): R|kotlin/Int| { ::R|/returnSuspendParameterValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnThrowsSuspendValue)) public final suspend fun returnThrowsSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnThrowsSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnThrowsSuspendValueNative(): R|kotlin/String| { ::R|/returnThrowsSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendVarargValue)) public final suspend fun returnSuspendVarargValueNative(vararg values: R|kotlin/Array|): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendVarargValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendVarargValueNative(vararg values: R|kotlin/Array|): R|kotlin/String| { ::R|/returnSuspendVarargValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnGenericSuspendValue)) public final suspend fun returnGenericSuspendValueNative(value: R|T|): R|T| { + @R|kotlin/native/ObjCName|(name = String(returnGenericSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnGenericSuspendValueNative(value: R|T|): R|T| { ::R|/returnGenericSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnInlineSuspendValue)) public final inline suspend fun returnInlineSuspendValueNative(value: R|T|): R|T| { + @R|kotlin/native/ObjCName|(name = String(returnInlineSuspendValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final inline suspend fun returnInlineSuspendValueNative(value: R|T|): R|T| { ::R|/returnInlineSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnNullableSuspendFlow)) public final suspend fun returnNullableSuspendFlowNative(): R|kotlinx/coroutines/flow/Flow?| { + @R|kotlin/native/ObjCName|(name = String(returnNullableSuspendFlow)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnNullableSuspendFlowNative(): R|kotlinx/coroutines/flow/Flow?| { ::R|/returnNullableSuspendFlow| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnExtensionValue)) public final suspend fun R|kotlin/String|.returnExtensionValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnExtensionValue)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|kotlin/String|.returnExtensionValueNative(): R|kotlin/String| { ::R|/returnExtensionValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -309,11 +309,11 @@ FILE: __GENERATED DECLARATIONS__.kt ::R|/returnCustomFlowValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnRefinedSuspendValue)) @R|kotlin/native/ShouldRefineInSwift|() public final suspend fun returnRefinedSuspendValueNative(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnRefinedSuspendValue)) @R|kotlin/native/ShouldRefineInSwift|() @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnRefinedSuspendValueNative(): R|kotlin/String| { ::R|/returnRefinedSuspendValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendFlowValue)) @R|kotlin/native/ShouldRefineInSwift|() public final suspend fun returnSuspendFlowValueNative(): R|kotlinx/coroutines/flow/Flow| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendFlowValue)) @R|kotlin/native/ShouldRefineInSwift|() @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendFlowValueNative(): R|kotlinx/coroutines/flow/Flow| { ::R|/returnSuspendFlowValue| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt index 4eefbe5f..ba4c2f56 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.ir.txt @@ -123,6 +123,7 @@ FILE fqName: fileName:/viewmodelscope.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyAndroidXViewModel1 annotations: ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope [val] CALL 'public final fun (: androidx.lifecycle.ViewModel): kotlinx.coroutines.CoroutineScope declared in androidx.lifecycle' type=kotlinx.coroutines.CoroutineScope origin=null @@ -175,6 +176,7 @@ FILE fqName: fileName:/viewmodelscope.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyAndroidXViewModel2 annotations: ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyAndroidXViewModel2' type=kotlinx.coroutines.CoroutineScope origin=null @@ -212,6 +214,7 @@ FILE fqName: fileName:/viewmodelscope.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyObservableViewModel1 annotations: ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope [val] CALL 'public final fun (: com.rickclephas.kmp.observableviewmodel.ViewModelScope): kotlinx.coroutines.CoroutineScope declared in com.rickclephas.kmp.observableviewmodel' type=kotlinx.coroutines.CoroutineScope origin=null @@ -273,6 +276,7 @@ FILE fqName: fileName:/viewmodelscope.kt VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:.MyObservableViewModel2 annotations: ObjCName(name = "returnSuspendValue1", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope [val] CALL 'internal final fun (): kotlinx.coroutines.CoroutineScope declared in .MyObservableViewModel2' type=kotlinx.coroutines.CoroutineScope origin=null @@ -408,6 +412,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyAndroidXViewModel1 annotations: ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlinx.coroutines.CoroutineScope [val] CALL 'public final fun (: androidx.lifecycle.ViewModel): kotlinx.coroutines.CoroutineScope declared in androidx.lifecycle' type=kotlinx.coroutines.CoroutineScope origin=null @@ -419,6 +424,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyAndroidXViewModel2 annotations: ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.coroutines.CoroutineScope [val] CALL 'public final fun (: androidx.lifecycle.ViewModel): kotlinx.coroutines.CoroutineScope declared in androidx.lifecycle' type=kotlinx.coroutines.CoroutineScope origin=null @@ -430,6 +436,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyObservableViewModel1 annotations: ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlinx.coroutines.CoroutineScope [val] CALL 'public final fun (: com.rickclephas.kmp.observableviewmodel.ViewModelScope): kotlinx.coroutines.CoroutineScope declared in com.rickclephas.kmp.observableviewmodel' type=kotlinx.coroutines.CoroutineScope origin=null @@ -442,6 +449,7 @@ FILE fqName: fileName:__GENERATED DECLARATIONS__.kt VALUE_PARAMETER kind:ExtensionReceiver name: index:0 type:.MyObservableViewModel2 annotations: ObjCName(name = "returnSuspendValue2", swiftName = , exact = ) + Throws(exceptionClasses = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:Exception modality:OPEN visibility:public superTypes:[kotlin.Throwable]' type=kotlin.reflect.KClass] type=kotlin.Array varargElementType=kotlin.Throwable) BLOCK_BODY VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlinx.coroutines.CoroutineScope [val] CALL 'public final fun (: com.rickclephas.kmp.observableviewmodel.ViewModelScope): kotlinx.coroutines.CoroutineScope declared in com.rickclephas.kmp.observableviewmodel' type=kotlinx.coroutines.CoroutineScope origin=null diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt index 3d09cffa..1433b6e4 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.kt.txt @@ -60,6 +60,7 @@ class MyAndroidXViewModel1 : ViewModel { } @ObjCName(name = "returnSuspendValue1") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValue1Native(): String { val tmp_0: CoroutineScope = (/* = */) return .returnSuspendValue1() @@ -85,6 +86,7 @@ class MyAndroidXViewModel2 : ViewModel { } @ObjCName(name = "returnSuspendValue1") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValue1Native(): String { val tmp_1: CoroutineScope = .() return .returnSuspendValue1() @@ -105,6 +107,7 @@ class MyObservableViewModel1 : ViewModel { } @ObjCName(name = "returnSuspendValue1") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValue1Native(): String { val tmp_2: CoroutineScope = (/* = .() */) return .returnSuspendValue1() @@ -130,6 +133,7 @@ class MyObservableViewModel2 : ViewModel { } @ObjCName(name = "returnSuspendValue1") + @Throws(exceptionClasses = [Exception::class]) suspend fun returnSuspendValue1Native(): String { val tmp_3: CoroutineScope = .() return .returnSuspendValue1() @@ -203,24 +207,28 @@ suspend fun MyObservableViewModel2.returnSuspendValue2(): String { // FILE: __GENERATED DECLARATIONS__.kt @ObjCName(name = "returnSuspendValue2") +@Throws(exceptionClasses = [Exception::class]) suspend fun MyAndroidXViewModel1.returnSuspendValue2Native(): String { val tmp_0: CoroutineScope = (/* = */) return returnSuspendValue2(/* = */) } @ObjCName(name = "returnSuspendValue2") +@Throws(exceptionClasses = [Exception::class]) suspend fun MyAndroidXViewModel2.returnSuspendValue2Native(): String { val tmp_1: CoroutineScope = (/* = */) return returnSuspendValue2(/* = */) } @ObjCName(name = "returnSuspendValue2") +@Throws(exceptionClasses = [Exception::class]) suspend fun MyObservableViewModel1.returnSuspendValue2Native(): String { val tmp_2: CoroutineScope = (/* = .() */) return returnSuspendValue2(/* = */) } @ObjCName(name = "returnSuspendValue2") +@Throws(exceptionClasses = [Exception::class]) suspend fun MyObservableViewModel2.returnSuspendValue2Native(): String { val tmp_3: CoroutineScope = (/* = .() */) return returnSuspendValue2(/* = */) diff --git a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt index 9498e40f..95113e22 100644 --- a/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt +++ b/kmp-nativecoroutines-compiler/src/testData/codegen/swift1/viewmodelscope.fir.txt @@ -45,7 +45,7 @@ FILE: viewmodelscope.kt ^returnSuspendValue1 String(OK1) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { ::R|/MyAndroidXViewModel1.returnSuspendValue1| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -63,7 +63,7 @@ FILE: viewmodelscope.kt ^returnSuspendValue1 String(OK3) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { ::R|/MyObservableViewModel1.returnSuspendValue1| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -84,7 +84,7 @@ FILE: viewmodelscope.kt ^returnSuspendValue1 String(OK5) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { ::R|/MyAndroidXViewModel2.returnSuspendValue1| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -105,7 +105,7 @@ FILE: viewmodelscope.kt ^returnSuspendValue1 String(OK7) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue1)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun returnSuspendValue1Native(): R|kotlin/String| { ::R|/MyObservableViewModel2.returnSuspendValue1| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } @@ -152,19 +152,19 @@ FILE: viewmodelscope.kt ) } FILE: __GENERATED DECLARATIONS__.kt - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyAndroidXViewModel1|.returnSuspendValue2Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|MyAndroidXViewModel1|.returnSuspendValue2Native(): R|kotlin/String| { ::R|/returnSuspendValue2| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyObservableViewModel1|.returnSuspendValue2Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|MyObservableViewModel1|.returnSuspendValue2Native(): R|kotlin/String| { ::R|/returnSuspendValue2| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyAndroidXViewModel2|.returnSuspendValue2Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|MyAndroidXViewModel2|.returnSuspendValue2Native(): R|kotlin/String| { ::R|/returnSuspendValue2| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } - @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) public final suspend fun R|MyObservableViewModel2|.returnSuspendValue2Native(): R|kotlin/String| { + @R|kotlin/native/ObjCName|(name = String(returnSuspendValue2)) @R|kotlin/Throws|(exceptionClasses = vararg((Q|kotlin/Exception|))) public final suspend fun R|MyObservableViewModel2|.returnSuspendValue2Native(): R|kotlin/String| { ::R|/returnSuspendValue2| R|kotlin/TODO|(String(KMP-NativeCoroutines generated declaration must be implemented in IR)) } From 75cf1bfa008120321ea9d5a4f8bce29958d149f3 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 12:29:13 +0100 Subject: [PATCH 10/18] Remove FRAMEWORK_SEARCH_PATHS and OTHER_LDFLAGS --- .../project.pbxproj | 96 ------------------- 1 file changed, 96 deletions(-) diff --git a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj index 20c09f95..b19ac38c 100644 --- a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj +++ b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj @@ -1481,7 +1481,6 @@ ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1504,11 +1503,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; @@ -1562,7 +1556,6 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1578,11 +1571,6 @@ ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; @@ -1634,7 +1622,6 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1658,11 +1645,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; @@ -1713,7 +1695,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1730,11 +1711,6 @@ ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; @@ -2052,7 +2028,6 @@ ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -2076,11 +2051,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.watchkitapp.watchkitextension; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; @@ -2134,7 +2104,6 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -2151,11 +2120,6 @@ ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.watchkitapp.watchkitextension; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; @@ -2208,7 +2172,6 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -2232,11 +2195,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = "com.rickclephas.kmp.watchOS-AppTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; @@ -2287,7 +2245,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -2304,11 +2261,6 @@ ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = "com.rickclephas.kmp.watchOS-AppTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; @@ -2365,7 +2317,6 @@ ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -2389,11 +2340,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -2447,7 +2393,6 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -2464,11 +2409,6 @@ MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -2520,7 +2460,6 @@ ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -2544,11 +2483,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -2601,7 +2535,6 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_PREVIEWS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -2618,11 +2551,6 @@ ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -2673,7 +2601,6 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -2698,11 +2625,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -2751,7 +2673,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -2769,11 +2690,6 @@ MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -2821,7 +2737,6 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -2846,11 +2761,6 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -2899,7 +2809,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -2917,11 +2826,6 @@ ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - NativeCoroutinesSampleShared, - ); PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; From 895d1c83549d3edb5f63128d9dcd99e7f555dc65 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 12:39:28 +0100 Subject: [PATCH 11/18] Fix reference to IntegrationTests --- sample/Async/AsyncTestUtils.swift | 2 +- sample/KotlinTypeAliases.swift | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sample/Async/AsyncTestUtils.swift b/sample/Async/AsyncTestUtils.swift index b0a9ece0..acb73105 100644 --- a/sample/Async/AsyncTestUtils.swift +++ b/sample/Async/AsyncTestUtils.swift @@ -8,7 +8,7 @@ import XCTest import NativeCoroutinesSampleShared -func assertJobCompleted(_ integrationTests: IntegrationTests) async { +func assertJobCompleted(_ integrationTests: KotlinIntergrationTests) async { await withCheckedContinuation { (continuation: CheckedContinuation) in // The job should complete soon after the stream finishes DispatchQueue.global().asyncAfter(deadline: .now() + 1) { diff --git a/sample/KotlinTypeAliases.swift b/sample/KotlinTypeAliases.swift index bdf87995..57c8911e 100644 --- a/sample/KotlinTypeAliases.swift +++ b/sample/KotlinTypeAliases.swift @@ -10,12 +10,14 @@ import NativeCoroutinesSampleShared #if NATIVE_COROUTINES_SWIFT_EXPORT typealias KotlinCompilerIntegrationTests = NativeCoroutinesSampleShared.tests.CompilerIntegrationTests +typealias KotlinIntergrationTests = NativeCoroutinesSampleShared.tests.IntegrationTests typealias KotlinNewMemoryModelIntegrationTests = NativeCoroutinesSampleShared.tests.NewMemoryModelIntegrationTests typealias KotlinSuspendIntegrationTests = NativeCoroutinesSampleShared.tests.SuspendIntegrationTests #else typealias KotlinCompilerIntegrationTests = NativeCoroutinesSampleShared.CompilerIntegrationTests +typealias KotlinIntergrationTests = NativeCoroutinesSampleShared.IntegrationTests typealias KotlinNewMemoryModelIntegrationTests = NativeCoroutinesSampleShared.NewMemoryModelIntegrationTests typealias KotlinSuspendIntegrationTests = NativeCoroutinesSampleShared.SuspendIntegrationTests From 8aa2b416f12457ed43aff88fd577aa80bb6d2c92 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 13:04:54 +0100 Subject: [PATCH 12/18] Disable unsupported issues sample code --- sample/Issues/GH206Tests.swift | 2 ++ sample/Issues/GH219Tests.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sample/Issues/GH206Tests.swift b/sample/Issues/GH206Tests.swift index 40a97d00..1f20a1b6 100644 --- a/sample/Issues/GH206Tests.swift +++ b/sample/Issues/GH206Tests.swift @@ -11,6 +11,7 @@ import NativeCoroutinesSampleShared class GH206Tests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnFlowValue() { let valueExpectation = expectation(description: "Waiting for value") _ = GH206().property({ value, next, _ in @@ -20,4 +21,5 @@ class GH206Tests: XCTestCase { }, { _, unit in unit }, { _, unit in unit }) wait(for: [valueExpectation], timeout: 2) } + #endif } diff --git a/sample/Issues/GH219Tests.swift b/sample/Issues/GH219Tests.swift index 70e22781..bd2c93cb 100644 --- a/sample/Issues/GH219Tests.swift +++ b/sample/Issues/GH219Tests.swift @@ -10,8 +10,10 @@ import NativeCoroutinesSampleShared class GH219Tests: XCTestCase { + #if !NATIVE_COROUTINES_SWIFT_EXPORT func testReturnStateFlowValue() { let gh219 = GH219Kt.createGH219() XCTAssertEqual(gh219.state, "GH219") } + #endif } From 7e60b8e5c09970117aa53a3beef29acb673860da Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 13:47:25 +0100 Subject: [PATCH 13/18] Inherit SWIFT_ACTIVE_COMPILATION_CONDITIONS --- .../project.pbxproj | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj index b19ac38c..d9947e3a 100644 --- a/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj +++ b/sample/KMPNativeCoroutinesSample.xcodeproj/project.pbxproj @@ -1506,7 +1506,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; @@ -1648,7 +1648,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; @@ -1783,7 +1783,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -1913,7 +1913,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; @@ -2055,7 +2055,7 @@ PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; @@ -2198,7 +2198,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.rickclephas.kmp.watchOS-AppTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; @@ -2343,7 +2343,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -2486,7 +2486,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2628,7 +2628,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -2764,7 +2764,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.rickclephas.kmp.nativecoroutines.sample.tests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; From c72d8457a82d24261fc12218b272a59c6c832a64 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 17:10:11 +0100 Subject: [PATCH 14/18] Add Swift export docs --- SWIFT_EXPORT.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 SWIFT_EXPORT.md diff --git a/SWIFT_EXPORT.md b/SWIFT_EXPORT.md new file mode 100644 index 00000000..f0fc93c4 --- /dev/null +++ b/SWIFT_EXPORT.md @@ -0,0 +1,60 @@ +# Swift Export compatibility and migration + +Starting with Kotlin 2.2.20 you can use the (experimental) +[Swift export](https://kotlinlang.org/docs/native-swift-export.html), which provides direct Kotlin - Swift interoperability. + +> [!WARNING] +> Swift export is still experimental and actively being developed! It doesn't yet support all language features, +> might still contain bugs, and it's behaviour could change in future versions. +> It is NOT recommended to use Swift export in production just yet! + +Once Swift export is complete and stable it'll likely completely remove the need for KMP-NativeCoroutines. + +So to support you in your journey to Swift export: + +* KMP-NativeCoroutines will try to be "compatible" with Swift export as much as possible, +allowing you to start testing with Swift export as soon as possible. +* A migration path will be provided once coroutines support in Swift export becomes stable. + + +# Known limitations + +These are the known limitations with Swift export and KMP-NativeCoroutines. + +## 🚨 `NativeSuspend` and `NativeFlow` are unsupported + +At the moment Swift export doesn't support functional return types yet. + +Unfortunately KMP-NativeCoroutines heavily relies on functional return types making it incompatible with Swift Export. +For now the plugin just clones your original functions and properties to prevent your Kotlin builds from failing. + +**Temporary workaround:** +You should disable any relevant code in Swift if you would like try Swift export. + +## ⚠️ `@ObjCName` is ignored + +The `@ObjCName` annotation is (currently) ignored by Swift export. +This prevents KMP-NativeCoroutines from reusing your original function or property name. + +**Temporary workaround:** +You should update your Swift code with the `Native` name suffix in order to access the generated declarations. + +# Enabling Swift export + +To enable Swift export with KMP-NativeCoroutines you start by following the +[official documentation](https://kotlinlang.org/docs/native-swift-export.html). + +Once Swift export is enabled you'll need to activate the Swift export compatibility mode: +```kotlin +// build.gradle.kts +nativeCoroutines { + swiftExport = true +} +``` + +# Usage + +At the moment you can't use any coroutines related code when Swift export is enabled. + +You can still use the generated properties for the `StateFlow.value` and `SharedFlow.replayCache` values, +but keep in mind the `@ObjCName` limitation. From 8a96db180ba8e64d5da1f0340f17cdfc66af4d5b Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 17:13:48 +0100 Subject: [PATCH 15/18] Add Swift export reference to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b40ed33f..b46e7145 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ So all the `Flow` interfaces lose their generic value type which make them hard This library solves both of these limitations 😄. +> [!NOTE] +> Looking to try Swift export? +> Read about its current state and limitations in [SWIFT_EXPORT.md](SWIFT_EXPORT.md). + ## Compatibility The latest version of the library uses Kotlin version `2.2.21`. From 10a09a460ee9e322b23fc8d35c1f0926fc9ea3cf Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 17:14:58 +0100 Subject: [PATCH 16/18] Fix typo --- SWIFT_EXPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SWIFT_EXPORT.md b/SWIFT_EXPORT.md index f0fc93c4..85779a8e 100644 --- a/SWIFT_EXPORT.md +++ b/SWIFT_EXPORT.md @@ -5,7 +5,7 @@ Starting with Kotlin 2.2.20 you can use the (experimental) > [!WARNING] > Swift export is still experimental and actively being developed! It doesn't yet support all language features, -> might still contain bugs, and it's behaviour could change in future versions. +> might still contain bugs, and its behaviour could change in future versions. > It is NOT recommended to use Swift export in production just yet! Once Swift export is complete and stable it'll likely completely remove the need for KMP-NativeCoroutines. From b1163d3f7cd341bc4224b8f755518f4e04c38d97 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 20:05:28 +0100 Subject: [PATCH 17/18] Fix typos --- SWIFT_EXPORT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SWIFT_EXPORT.md b/SWIFT_EXPORT.md index 85779a8e..d3bd22d1 100644 --- a/SWIFT_EXPORT.md +++ b/SWIFT_EXPORT.md @@ -25,11 +25,11 @@ These are the known limitations with Swift export and KMP-NativeCoroutines. At the moment Swift export doesn't support functional return types yet. -Unfortunately KMP-NativeCoroutines heavily relies on functional return types making it incompatible with Swift Export. +Unfortunately KMP-NativeCoroutines heavily relies on functional return types, making it incompatible with Swift Export. For now the plugin just clones your original functions and properties to prevent your Kotlin builds from failing. **Temporary workaround:** -You should disable any relevant code in Swift if you would like try Swift export. +You should disable any relevant code in Swift if you would like to try Swift export. ## ⚠️ `@ObjCName` is ignored From 6c63155643afd17a7e0fb2a193f7715df792b011 Mon Sep 17 00:00:00 2001 From: Rick Clephas Date: Sat, 8 Nov 2025 21:01:07 +0100 Subject: [PATCH 18/18] Use binary format for Swift export version --- .../compiler/runners/AbstractFirBaseCodegenTest.kt | 6 +++--- .../nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt index 0624df29..72dbcd53 100644 --- a/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt +++ b/kmp-nativecoroutines-compiler/src/test/kotlin/com/rickclephas/kmp/nativecoroutines/compiler/runners/AbstractFirBaseCodegenTest.kt @@ -80,12 +80,12 @@ abstract class AbstractFirBaseCodegenTest( KmpNativeCoroutinesDirectives.STATE_SUFFIX with "Value" KmpNativeCoroutinesDirectives.STATE_FLOW_SUFFIX with "Flow" } - listOf( - "1", // Kotlin 2.2.21 + listOf( + 0b1, // Kotlin 2.2.21 ).forEach { version -> forTestsMatching("swift$version/*") { defaultDirectives { - KmpNativeCoroutinesDirectives.SWIFT_EXPORT with SWIFT_EXPORT.parse(version) + KmpNativeCoroutinesDirectives.SWIFT_EXPORT with SWIFT_EXPORT.parse(version.toString()) } } } diff --git a/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt b/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt index aaa77af5..98cad406 100644 --- a/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt +++ b/kmp-nativecoroutines-gradle-plugin/src/main/kotlin/com/rickclephas/kmp/nativecoroutines/gradle/KmpNativeCoroutinesExtension.kt @@ -44,7 +44,7 @@ public open class KmpNativeCoroutinesExtension { /** * The compatibility version of Swift export used by the plugin. */ - public val swiftExportVersion: Long = 0x1 + public val swiftExportVersion: Long = 0b1 } public enum class ExposedSeverity {