https://kotlinlang.org logo
h

Hannes

09/01/2020, 3:28 PM
Hey, any expected-actual expert that could help me understand what I did misconfigure in my multiplatform project? In
commonTest
I have the following definition:
Copy code
expect fun suspendTest(body: suspend CoroutineScope.() -> Unit)
In
jvmTest
then I have
Copy code
actual fun suspendTest(body: suspend CoroutineScope.() -> Unit) {
    runBlocking { body() }
}
That works as expected. However in
nativeTest
, where I have the same
actual
implementation it doesnt work. Compiler says that it cannot find the actual suspendTest for IosX64:
e: FlowRedux/flowredux/src/commonTest/kotlin/TestUtils.kt: (3, 12): Expected function ‘suspendTest’ has no actual declaration in module <com.freeletics.flowredux:flowredux_test> for Native
e: FlowRedux/flowredux/src/nativeTest/kotlin/com/freeletics/flowredux/TestUtils.kt: (6, 12): Actual function ‘suspendTest’ has no corresponding expected declaration