Skip to content

Update nullable reference types for C# 10 #25883

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

Merged
merged 5 commits into from
Sep 2, 2021

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Aug 31, 2021

There are a number of changes here:

First two commits: I reworked the conceptual article to focus on the compiler's static analysis instead of the addition of nullable reference types as a type. That addresses many of the misconceptions that led to the various issues fixed in this PR.

Fixes #21716

  • Beginning in .NET 6, new projects have <nullable>enable</nullable> on by default.
  • Rework the conceptual article to focus more on the nullable analysis than on the new type annotations.

Third commit:

Fixes #24257

  • Provide a more detailed description and recommendations on using the different settings for annotations and warnings in a nullable context.

Fourth commit

Fixes #25027

  • Update the descriptions of the behavior for the annotation and warning contexts.

Internal preview - nullable overview

Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

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

I love the way this is shaping, here is some earlier feedback.

Apply suggestions from code review

Co-authored-by: David Pine <david.pine@microsoft.com>

final edit
@BillWagner BillWagner force-pushed the nullables-csharp10 branch 2 times, most recently from b569f6c to 8d6a0da Compare September 1, 2021 20:56
Provide a more detailed description and recommendations on using the different settings for annotations and warnings in a nullable context.
Fix descriptions of the warnings and annotations settings for nullable contexts.
@BillWagner BillWagner marked this pull request as ready for review September 2, 2021 19:21
Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

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

LGTM, had some suggestions and questions. Otherwise feel free to :shipit:

BillWagner and others added 2 commits September 2, 2021 16:24
Co-authored-by: David Pine <david.pine@microsoft.com>
@BillWagner BillWagner enabled auto-merge (squash) September 2, 2021 21:02
@BillWagner BillWagner merged commit 7f12616 into dotnet:main Sep 2, 2021
@BillWagner BillWagner deleted the nullables-csharp10 branch September 2, 2021 21:21
@gewarren
Copy link
Contributor

gewarren commented Sep 2, 2021

@BillWagner I think this introduced some bad lint.

@gewarren gewarren mentioned this pull request Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants