Re: Behaviour of System.Linq.Enumerable.DistinctIterator<T> on Mono and .NET

Jonathan Chambers <[email protected]> Thu, 22 Mar 2018 09:35:04 -0400
Newsgroups gmane.comp.gnome.mono.devel
Message-ID <CA+rpb=AUgu64qc6Qep5wKrcS6q1WfTx_kZtFUH8q9W9bUorwPQ@mail.gmail.com>
--===============6305532633825061215==
Content-Type: multipart/alternative; boundary="94eb2c128e6816fdd3056800606b"

--94eb2c128e6816fdd3056800606b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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 <[email protected]>
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 =3D items.SelectMany(e =3D> e.Deductions).Select(e =3D>
> e.Order).Distinct();
> foreach (var order in orders) {
>         =E2=80=A6 // 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 sourc=
e
> for  System.Linq.Enumerable,cs doesn=E2=80=99t 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
> [email protected]
> http://lists.dot.net/mailman/listinfo/mono-devel-list
>

--94eb2c128e6816fdd3056800606b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Jonathan,<div><br></div><div>Filing a GitHub issue in the =
Mono repo is best way to report/track this.</div><div><br></div><div>I foun=
d a similar sounding issue, but perhaps it&#39;s different:=C2=A0<a href=3D=
"https://github.com/mono/mono/issues/7696">https://github.com/mono/mono/iss=
ues/7696</a></div><div><br></div><div>Thanks,</div><div>Jonathan</div></div=
><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Mar 21, =
2018 at 7:11 PM, Jonathan Mitchell <span dir=3D"ltr">&lt;<a href=3D"mailto:=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span>=
 wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex">On Mono 5.4.1<br>
<br>
The following Distinct() method calls succeeds on .Net but raises with a=C2=
=A0 Null ref exception on Mono macOS 10.13<br>
.<br>
var orders =3D items.SelectMany(e =3D&gt; e.Deductions).Select(e =3D&gt; e.=
Order).Distinct();<br>
foreach (var order in orders) {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=80=A6 // order is Null here and raises<br>
}<br>
<br>
<br>
On Mono `order` is Null though `orders` is an instance of System.Linq.Enume=
rable.<wbr>DistinctIterator&lt;T&gt;.<br>
In the local vars browser `orders` IEnumerator is Null.<br>
<br>
I know I am a bit behind the curve in using 5.4.1 but the Reference source =
for=C2=A0 System.Linq.Enumerable,cs doesn=E2=80=99t seem to have changed mu=
ch.<br>
I thought the use of the reference source would have nuked this sort of div=
ergence?<br>
Or maybe I am just being a bit stupid...<br>
<br>
Thanks<br>
<br>
Jonathan<br>
<br>
<br>
______________________________<wbr>_________________<br>
Mono-devel-list mailing list<br>
<a href=3D"mailto:[email protected]">[email protected].=
net</a><br>
<a href=3D"http://lists.dot.net/mailman/listinfo/mono-devel-list" rel=3D"no=
referrer" target=3D"_blank">http://lists.dot.net/mailman/<wbr>listinfo/mono=
-devel-list</a><br>
</blockquote></div><br></div>

--94eb2c128e6816fdd3056800606b--

--===============6305532633825061215==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTW9uby1kZXZl
bC1saXN0IG1haWxpbmcgbGlzdApNb25vLWRldmVsLWxpc3RAbGlzdHMuZG90Lm5ldApodHRwOi8v
bGlzdHMuZG90Lm5ldC9tYWlsbWFuL2xpc3RpbmZvL21vbm8tZGV2ZWwtbGlzdAo=

--===============6305532633825061215==--