Patrick Ramsey
08/27/2021, 3:31 AM/**
* Returns the context of the current coroutine.
*/
@SinceKotlin("1.3")
@Suppress("WRONG_MODIFIER_TARGET")
@InlineOnly
public suspend inline val coroutineContext: CoroutineContext
get() {
throw NotImplementedError("Implemented as intrinsic")
}
That is a wild bit of code. How does a suspend inline val
exist in the language, and how is it that all it takes to make it work is to suppress the compiler warning that that’s not allowed?ephemient
08/27/2021, 6:30 AM