would it be possible to do something like this? ``...
# announcements
m
would it be possible to do something like this?
Copy code
fun interface A : suspend () -> Unit
currently
suspend
is not allowed as a supertype
l
Copy code
fun interface A {
    operator suspend fun invoke()  
}
Maybe something li ke this?
e
yeah the first way is not a great idea, because
suspend () -> 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.
m
@LeoColman that’s how am doing it, just curious about inheriting suspend function
@ephemient I understand, thanks