Skip to content

Fix MemberExpression funcletization#33241

Merged
roji merged 1 commit intodotnet:mainfrom
roji:FuncletizerFix
Mar 5, 2024
Merged

Fix MemberExpression funcletization#33241
roji merged 1 commit intodotnet:mainfrom
roji:FuncletizerFix

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
@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