Skip to content

Commit 5d7acdc

Browse files
committed
OptIn to ExperimentalForInheritanceCoroutinesApi
1 parent 3df5a99 commit 5d7acdc

File tree

1 file changed

+3
-0
lines changed
  • kmp-observableviewmodel-core/src/appleMain/kotlin/com/rickclephas/kmp/observableviewmodel

1 file changed

+3
-0
lines changed

kmp-observableviewmodel-core/src/appleMain/kotlin/com/rickclephas/kmp/observableviewmodel/StateFlow.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public actual fun <T> MutableStateFlow(
1717
* A [MutableStateFlow] that triggers [ViewModelScopeImpl.sendObjectWillChange]
1818
* and accounts for the [ViewModelScopeImpl.subscriptionCount].
1919
*/
20+
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
2021
private class MutableStateFlowImpl<T>(
2122
private val viewModelScope: ViewModelScopeImpl,
2223
private val stateFlow: MutableStateFlow<T>
@@ -67,6 +68,7 @@ private class MutableStateFlowImpl<T>(
6768
/**
6869
* A [StateFlow] that combines the subscription counts of a [ViewModelScopeImpl] and [StateFlow].
6970
*/
71+
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
7072
private class SubscriptionCountFlow(
7173
private val viewModelScopeSubscriptionCount: StateFlow<Int>,
7274
private val stateFlowSubscriptionCount: StateFlow<Int>
@@ -139,6 +141,7 @@ private fun <T> CoroutineScope.launchSharing(
139141
* Similar to the kotlinx.coroutines implementation, used to return a read-only StateFlow with an optional Job.
140142
* https://github.com/Kotlin/kotlinx.coroutines/blob/6dfabf763fe9fc91fbb73eb0f2d5b488f53043f1/kotlinx-coroutines-core/common/src/flow/operators/Share.kt#L379
141143
*/
144+
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
142145
private class ReadonlyStateFlow<T>(
143146
flow: StateFlow<T>,
144147
@Suppress("unused")

0 commit comments

Comments
 (0)