[release/6.0] Fix Queryable-to-Enumerable overload mapping logic (#65857)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 10 Mar 2022 20:37:58 +0000 (12:37 -0800)
committerGitHub <noreply@github.com>
Thu, 10 Mar 2022 20:37:58 +0000 (12:37 -0800)
commit00481760a8daed8dce7a8cac95aa31c3a526b865
tree9c5e2223fdaac5f75cb0d80c70bc3865d48ab69c
parentd4ba2cccbecc0f4d7466dbbd5d443231e4441282
[release/6.0] Fix Queryable-to-Enumerable overload mapping logic (#65857)

* Fix Queryable-to-Enumerable overload mapping logic

* fix linker warnings

* address feedback

* use strict order when calculating maximal elements

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
src/libraries/System.Linq.Queryable/src/System/Linq/EnumerableRewriter.cs
src/libraries/System.Linq.Queryable/tests/FirstOrDefaultTests.cs
src/libraries/System.Linq.Queryable/tests/LastOrDefaultTests.cs
src/libraries/System.Linq.Queryable/tests/SingleOrDefaultTests.cs