When browsing through Kotlin source code, I found that in some places NotImplementedError
is thrown:
public suspend inline val coroutineContext: CoroutineContext
get() {
throw NotImplementedError("Implemented as intrinsic")
}
public suspend inline fun <T> suspendCoroutineUninterceptedOrReturn(crossinline block: (Continuation<T>) -> Any?): T {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
throw NotImplementedError("Implementation of suspendCoroutineUninterceptedOrReturn is intrinsic")
}
I assume these are not real not-implemented errors since otherwise code cannot run.
My questions are:
- what does "intrinsic" mean here and why
NotImplementedError
is thrown? - where could I view the source code for these implementation?