Skip to content

Commit c02648b

Browse files
committed
ContextScope.toString for better debuggability
1 parent a930b0c commit c02648b

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ internal open class ScopeCoroutine<in T>(
3535

3636
internal class ContextScope(context: CoroutineContext) : CoroutineScope {
3737
override val coroutineContext: CoroutineContext = context
38+
// CoroutineScope is used intentionally for user-friendly representation
39+
override fun toString(): String = "CoroutineScope(coroutineContext = $coroutineContext)"
3840
}

0 commit comments

Comments
 (0)