Skip to content
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

Fixer to convert [MaybeNull]T to T? where applicable #50819

Open
jcouv opened this issue Jan 27, 2021 · 0 comments
Open

Fixer to convert [MaybeNull]T to T? where applicable #50819

jcouv opened this issue Jan 27, 2021 · 0 comments

Comments

@jcouv
Copy link
Member

jcouv commented Jan 27, 2021

C# 9 allows for T? on types that are not known to be reference or value types. This reduces the need to use nullability attributes.

For instance void M<T>([AllowNull]T value) can now be expressed with void M<T>(T? value).

We could create an analyzer/fixer pair to help users migrate to the more modern and concise style.

Relates to #48023 (which is now closed and was attempting to solve that problem a different way)

@jcouv jcouv added the Area-IDE label Jan 27, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jan 27, 2021
@jinujoseph jinujoseph added Concept-Continuous Improvement Feature Request and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 28, 2021
@jinujoseph jinujoseph added this to the Backlog milestone Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
IDE Nullability Work
  
Awaiting triage
Development

No branches or pull requests

2 participants