Skip to content

Handle nullable postcondition for non-static local function inside field initializer#76716

Merged
RikkiGibson merged 8 commits intodotnet:mainfrom
RikkiGibson:issue76528
Feb 7, 2025
Merged

Handle nullable postcondition for non-static local function inside field initializer#76716
RikkiGibson merged 8 commits intodotnet:mainfrom
RikkiGibson:issue76528

Conversation

@RikkiGibson
Copy link
Member

Closes #76528

@ghost ghost added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 10, 2025
@RikkiGibson RikkiGibson marked this pull request as ready for review January 11, 2025 16:38
@RikkiGibson RikkiGibson requested a review from a team as a code owner January 11, 2025 16:38
{
public static string? field;

public Action Prop1 { get; } = () =>
Copy link
Member

Choose a reason for hiding this comment

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

Consider testing also when the lambdas are marked static.

@RikkiGibson RikkiGibson requested a review from a team January 14, 2025 23:43
@RikkiGibson
Copy link
Member Author

@dotnet/roslyn-compiler for second review

@jcouv jcouv self-assigned this Jan 17, 2025
@AlekseyTs
Copy link
Contributor

Done with review pass (commit 2)

@AlekseyTs
Copy link
Contributor

Done with review pass (commit 7)

@jcouv jcouv removed their assignment Feb 4, 2025
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 8)

@RikkiGibson RikkiGibson merged commit b2862ce into dotnet:main Feb 7, 2025
24 checks passed
@RikkiGibson RikkiGibson deleted the issue76528 branch February 7, 2025 17:27
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Feb 7, 2025
@akhera99 akhera99 modified the milestones: Next, 17.14 P2 Feb 25, 2025
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

Development

Successfully merging this pull request may close these issues.

[MemberNotNull(When)] annotations don't work on local functions inside member initializers inside non-static closure chains

5 participants