Source.combine and MergeLatest don't work correctly for a single source
t:stream
`Stream.combine` combined with `MergeLatest` does not work as expected if a list with exactly one source is passed to it.
## Example
`Source.combine(Seq(Source.single(1)))(MergeLatest(_))` emits a single value `1`, instead of the expected `List(1)`.
## Cause
There is a special handling for a list with exactly one source:
https://github.com/apache/pekko/blob/66d7dc19464c1e082e759f0595cd8976249b7b00/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala#L806
This works for something like `Merge`, but not `MergeLatest`.
2 条评论