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

default() should have a null or not null constraint on it #422

Closed
tamasvajk opened this issue Jun 12, 2017 · 0 comments
Closed

default() should have a null or not null constraint on it #422

tamasvajk opened this issue Jun 12, 2017 · 0 comments
Assignees
Milestone

Comments

@tamasvajk
Copy link
Contributor

Description

There's no constraint applied on default(T).

Repro steps

var s = default(string);
if (s == null) // no S2589
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants