Skip to content

Commit

Permalink
Don't unconditionally cast uCont in ScopeCoroutine cast to CoroutineS…
Browse files Browse the repository at this point in the history
…tackFrame

Fixes #2386
  • Loading branch information
willbuck authored and qwwdfsad committed Nov 16, 2020
1 parent 37b95a9 commit dede17e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kotlinx-coroutines-core/common/src/internal/Scopes.kt
Expand Up @@ -16,7 +16,7 @@ internal open class ScopeCoroutine<in T>(
context: CoroutineContext,
@JvmField val uCont: Continuation<T> // unintercepted continuation
) : AbstractCoroutine<T>(context, true), CoroutineStackFrame {
final override val callerFrame: CoroutineStackFrame? get() = uCont as CoroutineStackFrame?
final override val callerFrame: CoroutineStackFrame? get() = uCont as? CoroutineStackFrame
final override fun getStackTraceElement(): StackTraceElement? = null
final override val isScopedCoroutine: Boolean get() = true

Expand Down

0 comments on commit dede17e

Please sign in to comment.