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

Fix MemberExpression funcletization #33241

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Fix MemberExpression funcletization #33241

merged 1 commit into from
Mar 5, 2024

Conversation

roji
Copy link
Member

@roji roji commented Mar 5, 2024

This fixes a bug in the new funcletizer (#33106), found while syncing EFCore.PG to preview.2.

When a MemberExpression is evaluatable, we need to treat it as containing a captured variable, so that it gets parameterized - because evaluating the member again may yield a different answer (the exception is a static readonly member, which can be constantized). We were doing that, but only when the MemberExpression is the root of the evaluatable fragment; when it was embedded inside a larger evaluatable, we incorrectly constantized instead.

Continues #33106

@roji roji requested a review from maumar March 5, 2024 08:45
@roji roji force-pushed the FuncletizerFix branch from 6a2aef2 to 0923096 Compare March 5, 2024 10:58
@roji roji merged commit eb3f9c4 into dotnet:main Mar 5, 2024
7 checks passed
@roji roji deleted the FuncletizerFix branch March 5, 2024 11:44
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.

2 participants