Marko Novakovic
05/07/2021, 5:30 AMfun interface A : suspend () -> Unit
currently suspend
is not allowed as a supertypeLeoColman
05/07/2021, 6:12 AMfun interface A {
operator suspend fun invoke()
}
LeoColman
05/07/2021, 6:12 AMephemient
05/07/2021, 6:49 AMsuspend () -> Unit
has the same erased type as (Continuation<*>) -> Unit
. compiler uses an annotation to distinguish between suspend and non-suspend function types, but it can't be applied to your usage there.Marko Novakovic
05/07/2021, 8:28 AMMarko Novakovic
05/07/2021, 8:29 AM