FE: Use safe call when searching for suspend modifier
The modifier does not exist, when the parameter type is typealias. #KT-35187 Fixed
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.coroutines.*
|
||||
|
||||
typealias Handler = suspend (String) -> Unit
|
||||
|
||||
suspend inline fun foo(handler: Handler) {
|
||||
handler("OK")
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(Continuation(EmptyCoroutineContext) {
|
||||
it.getOrThrow()
|
||||
})
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = "FAIL"
|
||||
builder {
|
||||
foo {
|
||||
result = it
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user