Check default parameters of expect suspend functions on original

functions instead of function views.
 #KT-24461 Fixed
This commit is contained in:
Ilmir Usmanov
2019-11-12 16:27:58 +03:00
parent 633d1c9ea3
commit ea5b529d19
7 changed files with 62 additions and 1 deletions
@@ -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
}