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

Query: Match memberInfo in hierarchy for reducing MemberInitExpression #19182

Merged
merged 1 commit into from
Dec 5, 2019

Conversation

smitpatel
Copy link
Contributor

Issue: For compiler generated trees the MemberInfos always in sync. But for manually generated trees, if derived type parameter is used then the MemberInfo.ReflectedType is different. Which throws off ReplacingExpressionVisitor when comparing MemberInfo.
Fix: Use helper method IsSameAs which compare memberInfos which refer to same member access in given hierarchy

Resolves #19087

Issue: For compiler generated trees the MemberInfos always in sync. But for manually generated trees, if derived type parameter is used then the MemberInfo.ReflectedType is different. Which throws off ReplacingExpressionVisitor when comparing MemberInfo.
Fix: Use helper method IsSameAs which compare memberInfos which refer to same member access in given hierarchy

Resolves #19087
@smitpatel smitpatel merged commit 4b42c7a into master Dec 5, 2019
@smitpatel smitpatel deleted the smit/issue19087 branch December 5, 2019 19:37
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.

Building Filter and/or OrderBy via Expression on Intermediate type throws InvalidOpException
2 participants