Meerownymous / Tonga

MIT License
1 stars 0 forks source link

Union does not work with non-distinct enumerable #4

Open MSE1188 opened 2 months ago

MSE1188 commented 2 months ago

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 around Union.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.

Meerownymous commented 2 months ago

Thanks for bringing this one up.