The union only works with distinct enumerables. On non-distinct enumerables the result is not as expected.
E.g. Union.New(ManyOf.New(1,1,2), ManyOf.New(2,3)) results in an enumerable [1,2], even if [2] would be expected.
The other way around Union.New(ManyOf.New(2,3), ManyOf.New(1,1,2)) works fine.
Expected Behavior
See https://github.com/icarus-consulting/Yaapii.Atoms/pull/568 for fix of this issue
Actual Behavior
The union only works with distinct enumerables. On non-distinct enumerables the result is not as expected. E.g.
Union.New(ManyOf.New(1,1,2), ManyOf.New(2,3))
results in an enumerable[1,2]
, even if[2]
would be expected. The other way aroundUnion.New(ManyOf.New(2,3), ManyOf.New(1,1,2))
works fine.Mention any other details that might be useful
Steps to reproduce the behavior
The log given by the failure.