-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Double-evaluation of selector in SelectMany #20143
Comments
You put forward the idea of having tests that both guarded against double evaluation of enumerables and against changes to how often delegates where called. At the time you said that I was already working on the first part of that, and submitted a PR saying I'd look at the other part "soon". Soon has yet to happen. |
Ah, gotcha, I misremembered. Thanks! |
Or you remembered my saying "soon" too well. It's definitely something we should have, but ensuring it has coverage would be a bit tricky. Maybe a trait could help there. |
I found out my changes from dotnet/corefx#14675 introduced a double-evaluation of a selector in
SelectMany.ToArray
: https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/SelectMany.cs#L245 This will be fixed shortly in an upcoming PR, but I am opening a tracking issue just in case I forget or that PR gets closed.The text was updated successfully, but these errors were encountered: