We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dfd6de commit f7f14b3Copy full SHA for f7f14b3
kotlinx-coroutines-core/common/src/flow/operators/Lint.kt
@@ -83,7 +83,8 @@ public val FlowCollector<*>.coroutineContext: CoroutineContext
83
get() = noImpl()
84
85
@Deprecated(
86
- message = "SharedFlow never completes, so this operator has no effect.",
+ message = "SharedFlow never completes, so this operator typically has not effect, it can only " +
87
+ "catch exceptions from 'onSubscribe' operator",
88
level = DeprecationLevel.WARNING,
89
replaceWith = ReplaceWith("this")
90
)
kotlinx-coroutines-core/common/test/flow/sharing/SharedFlowTest.kt
@@ -602,6 +602,7 @@ class SharedFlowTest : TestBase() {
602
}
603
604
@Test
605
+ @Suppress("DEPRECATION") // 'catch'
606
fun onSubscriptionThrows() = runTest {
607
expect(1)
608
val sh = MutableSharedFlow<String>(1)
0 commit comments