“内在的”有什么?在科特林的实施意义?
当浏览Kotlin源代码时,我发现在某些地方notimplementedError
被抛出:
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")
}
我认为这些不是真正的不插入错误,因为否则代码无法运行。
我的问题是:
- “内在”在这里是什么意思,为什么
nocplemplededError
被抛出? - 在哪里可以查看这些实现的源代码?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现此很棒的答案我的家伙。
I've found this great answer for you, my dude.