Skip to content

Commit dede17e

Browse files
willbuckqwwdfsad
authored andcommitted
Don't unconditionally cast uCont in ScopeCoroutine cast to CoroutineStackFrame
Fixes #2386
1 parent 37b95a9 commit dede17e

File tree

1 file changed

+1
-1
lines changed
  • kotlinx-coroutines-core/common/src/internal

1 file changed

+1
-1
lines changed

kotlinx-coroutines-core/common/src/internal/Scopes.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal open class ScopeCoroutine<in T>(
1616
context: CoroutineContext,
1717
@JvmField val uCont: Continuation<T> // unintercepted continuation
1818
) : AbstractCoroutine<T>(context, true), CoroutineStackFrame {
19-
final override val callerFrame: CoroutineStackFrame? get() = uCont as CoroutineStackFrame?
19+
final override val callerFrame: CoroutineStackFrame? get() = uCont as? CoroutineStackFrame
2020
final override fun getStackTraceElement(): StackTraceElement? = null
2121
final override val isScopedCoroutine: Boolean get() = true
2222

0 commit comments

Comments
 (0)