Skip to content
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

Evaluate captured variables during expression tree comparison #1000

Merged
merged 3 commits into from
Apr 18, 2020

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Apr 18, 2020

Fixes #955.

C# and VB.NET lambdas capture variables, not values, which can lead to
surprises: If two expression trees are identical except for capturing
different variables at the same node, Moq will consider those trees
unequal, even if both captured variables are equal at the time of com-
parison. This may be too pedantic for some real-world use cases.
@stakx stakx added this to the 4.14.0 milestone Apr 18, 2020
@stakx stakx merged commit 5234fb2 into devlooped:master Apr 18, 2020
@stakx stakx deleted the expression-equality branch April 18, 2020 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After updating moq from 4.10.1 to 4.11, mocking nhibernate session throws a System.NullReferenceException.
1 participant