Skip to content

Commit

Permalink
Return List of errors for all variants of zipOrAccumulate
Browse files Browse the repository at this point in the history
The four-arg and five-arg variants were returning Collection instead of
List.
  • Loading branch information
YuitoSato authored and michaelbull committed Mar 10, 2024
1 parent c46a292 commit 716109a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public inline fun <T1, T2, T3, T4, E, V> zipOrAccumulate(
producer3: () -> Result<T3, E>,
producer4: () -> Result<T4, E>,
transform: (T1, T2, T3, T4) -> V,
): Result<V, Collection<E>> {
): Result<V, List<E>> {
contract {
callsInPlace(producer1, InvocationKind.EXACTLY_ONCE)
callsInPlace(producer2, InvocationKind.EXACTLY_ONCE)
Expand Down Expand Up @@ -268,7 +268,7 @@ public inline fun <T1, T2, T3, T4, T5, E, V> zipOrAccumulate(
producer4: () -> Result<T4, E>,
producer5: () -> Result<T5, E>,
transform: (T1, T2, T3, T4, T5) -> V,
): Result<V, Collection<E>> {
): Result<V, List<E>> {
contract {
callsInPlace(producer1, InvocationKind.EXACTLY_ONCE)
callsInPlace(producer2, InvocationKind.EXACTLY_ONCE)
Expand Down

0 comments on commit 716109a

Please sign in to comment.