[Mono-dev] Behaviour of System.Linq.Enumerable.DistinctIterator<T> on Mono and .NET

Jonathan Chambers joncham at gmail.com
Thu Mar 22 13:35:04 UTC 2018


Jonathan,

Filing a GitHub issue in the Mono repo is best way to report/track this.

I found a similar sounding issue, but perhaps it's different:
https://github.com/mono/mono/issues/7696

Thanks,
Jonathan

On Wed, Mar 21, 2018 at 7:11 PM, Jonathan Mitchell <lists at mugginsoft.com>
wrote:

> On Mono 5.4.1
>
> The following Distinct() method calls succeeds on .Net but raises with a
> Null ref exception on Mono macOS 10.13
> .
> var orders = items.SelectMany(e => e.Deductions).Select(e =>
> e.Order).Distinct();
> foreach (var order in orders) {
>         … // order is Null here and raises
> }
>
>
> On Mono `order` is Null though `orders` is an instance of
> System.Linq.Enumerable.DistinctIterator<T>.
> In the local vars browser `orders` IEnumerator is Null.
>
> I know I am a bit behind the curve in using 5.4.1 but the Reference source
> for  System.Linq.Enumerable,cs doesn’t seem to have changed much.
> I thought the use of the reference source would have nuked this sort of
> divergence?
> Or maybe I am just being a bit stupid...
>
> Thanks
>
> Jonathan
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20180322/bd379d3c/attachment.html>


More information about the Mono-devel-list mailing list