Skip to content

Check for BackingField instead of IsAutoProperty in NullableWalker#75872

Merged
RikkiGibson merged 3 commits intodotnet:mainfrom
RikkiGibson:remove-getFieldSymbolToBeInitialized
Nov 21, 2024
Merged

Check for BackingField instead of IsAutoProperty in NullableWalker#75872
RikkiGibson merged 3 commits intodotnet:mainfrom
RikkiGibson:remove-getFieldSymbolToBeInitialized

Conversation

@RikkiGibson
Copy link
Member

@RikkiGibson RikkiGibson commented Nov 12, 2024

Closes #75245

It looks like this function is still needed for some complex cases involving required properties, MemberNotNull applied to setters, and constructor chaining. I adjusted the function to behave correctly with properties using the field keyword as well.

It looks like this function is no longer needed because we recently added a mechanism to share a slot between property and backing field under appropriate conditions. Specifically, changes to NullableWalker.GetOrCreateSlot in #75246.

@ghost ghost added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 12, 2024
@RikkiGibson RikkiGibson changed the title Remove get field symbol to be initialized Remove getFieldSymbolToBeInitialized Nov 12, 2024
@RikkiGibson

This comment was marked as resolved.

@RikkiGibson RikkiGibson changed the title Remove getFieldSymbolToBeInitialized Check for BackingField instead of IsAutoProperty in NullableWalker.Scan.getFieldSymbolToBeInitialized Nov 20, 2024
@RikkiGibson RikkiGibson changed the title Check for BackingField instead of IsAutoProperty in NullableWalker.Scan.getFieldSymbolToBeInitialized Check for BackingField instead of IsAutoProperty in NullableWalker Nov 20, 2024
@RikkiGibson RikkiGibson marked this pull request as ready for review November 20, 2024 20:01
@RikkiGibson RikkiGibson requested a review from a team as a code owner November 20, 2024 20:01
Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (commit 3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

4 participants