You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since a SharedFlow never ends and collecting it "never completes normally," it'd be possible, semantically correct, and possibly illustrative to add a "fauxveride" of SharedFlow.collect returning Nothing.
Since it's an extension method, it can't actually be an override, but adding it as an overload should have effectively the same result.
Kotlin#2803)
* Introduce SharedFlow collect overload and override that return Nothing
* Override will ensure the proper implementation of the interface
* collect extension is added as the very basic lint helper
FixesKotlin#2789FixesKotlin#2502
Co-authored-by: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com>
pablobaxter
pushed a commit
to pablobaxter/kotlinx.coroutines
that referenced
this issue
Sep 14, 2022
Kotlin#2803)
* Introduce SharedFlow collect overload and override that return Nothing
* Override will ensure the proper implementation of the interface
* collect extension is added as the very basic lint helper
FixesKotlin#2789FixesKotlin#2502
Co-authored-by: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com>
Since a
SharedFlow
never ends and collecting it "never completes normally," it'd be possible, semantically correct, and possibly illustrative to add a "fauxveride" ofSharedFlow.collect
returningNothing
.Since it's an extension method, it can't actually be an override, but adding it as an overload should have effectively the same result.
Inspired by https://stackoverflow.com/q/68121398/869736.
The text was updated successfully, but these errors were encountered: