https://kotlinlang.org logo
#coroutines
Title
# coroutines
m

mikehearn

03/03/2021, 4:42 PM
However, the replacement
onReceiveOrNull
is already imported, but, not being used.
g

greyteardrop

03/03/2021, 7:33 PM
I had the same issue. It’s not obvious from the first sight, but the extension function is only declared for
<E : Any> ReceiveChannel<E>
- only for channels that have non-nullable element type. If you have a channel with a nullable element type then the extension function won’t be picked up and instead a deprecated member function is still used.
7 Views