-
Notifications
You must be signed in to change notification settings - Fork 9
Closed as not planned
Labels
part:coreAffects the core types (`Sender`, `Receiver`, exceptions, etc.)Affects the core types (`Sender`, `Receiver`, exceptions, etc.)type:bugSomething isn't workingSomething isn't working
Milestone
Description
What happened?
When calling map() on a receiver, the returned type is of type _Map and tying-wise it is an abstract Receiver, this means that when mapping a receiver that has more methods, like .close() for merging or .reset() for Timer, these methods are not available anymore after .map() is used.
What did you expect instead?
I expect the type to be preserved, so the mapped receiver can be used the same way as the original receiver.
Extra information
The only way to fix this is probably to have some mapping logic inside Receiver itself instead of returning a new type. That or removing .map() and just let users do the transformation themselves when consuming from the receiver.
Metadata
Metadata
Assignees
Labels
part:coreAffects the core types (`Sender`, `Receiver`, exceptions, etc.)Affects the core types (`Sender`, `Receiver`, exceptions, etc.)type:bugSomething isn't workingSomething isn't working