I guess it is pretty late for this, but wonder wha...
# coroutines
m
I guess it is pretty late for this, but wonder what is the reason to move Flow's functionality behind extension method, while method that should not be used is the regular interface method with the same name? When I type
emptyFlow<Unit>().collect
, method on the top of the list in IDE's completion will be the internal method that should not be used. At first IntelliJ did not suggest any extension methods to me. I was baffled since all examples just mention to call
.collect {}
, but all I got was method marked as internal with documentation saying to not use. Then on subsequent tries, IDE started suggesting extension methods, but it was not transparent process.
1
z
Agreed, this is frustrating. It would be better if the “internal”
collect
did not show up in auto-complete at all, or at least appeared below the main extension version.
e
Auto-completion will be fixed.
👍 1
m
this seems like a huge hassle though, needing to also fix up auto-completion
wouldn't it be just simpler to call the interface method something else?
e
This is also a temporary measure. It might become normal public in the future.
👍 1