Skip to content

Conversation

@stephentoub
Copy link
Member

In some cases, this was achieved by:

  • Using [MemberNotNull] when it could be used to enable the compiler to appropriately follow the initialization
  • Making the field nullable and using !s at usage sites in cases where the = null! wasn't appropriate because the field could actually be null
  • Making the field nullable and adding null checks sparingly
  • Suppressing warnings in cases where fields weren't accessed in managed code
  • Removing stale cases where it wasn't necessary anymore anyway
  • Removing unnecessary empty internal/private ctors

In some cases, this was achieved by:
- Using [MemberNotNull] when it could be used to enable the compiler to appropriately follow the initialization
- Making the field nullable and using `!`s at usage sites in cases where the `= null!` wasn't appropriate because the field could actually be null
- Making the field nullable and adding null checks sparingly
- Suppressing warnings in cases where fields weren't accessed in managed code
- Removing stale cases where it wasn't necessary anymore anyway
- Removing unnecessary empty internal/private ctors
@stephentoub stephentoub reopened this May 13, 2020
@stephentoub stephentoub merged commit 5c66721 into dotnet:master May 13, 2020
@stephentoub stephentoub deleted the nullablecorelib branch May 13, 2020 13:13
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants