Skip to content

Conversation

@RikkiGibson
Copy link
Member

Closes #80504

We may analyze the state of a base property on exit, when it is required, and the constructor has SetsRequiredMembers. In this case we need to take care to ignore a backing field, even if the property uses the field keyword. This is because we want the analysis of the constructor in the subtype to behave similarly regardless of whether the base type comes from source or metadata.

@RikkiGibson RikkiGibson marked this pull request as ready for review January 24, 2026 01:40
@RikkiGibson RikkiGibson requested a review from a team as a code owner January 24, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SetsRequiredMembers] on constructor causes csc.exe crash/build & analyzer failures when required properties in base class use field keyword

2 participants