Check default parameters of expect suspend functions on original
functions instead of function views. #KT-24461 Fixed
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// FILE: lib.kt
|
||||
|
||||
expect interface I {
|
||||
suspend fun f(p: Int = 1): String
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import kotlin.coroutines.*
|
||||
import helpers.*
|
||||
|
||||
actual interface I {
|
||||
actual suspend fun f(p: Int): String
|
||||
}
|
||||
|
||||
class II : I {
|
||||
override suspend fun f(p: Int): String = "OK"
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = II().f()
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user