Skip to content

C#: Add test for cs/dereferenced-value-may-be-null #3073

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 2 commits into from
Mar 26, 2020

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Mar 16, 2020

Record the FP reported here.

calumgrant
calumgrant previously approved these changes Mar 26, 2020
@@ -366,6 +366,16 @@ static void Ex33(string s, object o)
static int Ex34(string s = null) => s.Length; // BAD (maybe)

static int Ex35(string s = "null") => s.Length; // GOOD

static int Ex44(object o)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not Ex36?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that is a very good question :-) I will change it.

@calumgrant calumgrant merged commit 782f2b5 into github:master Mar 26, 2020
@hvitved hvitved deleted the csharp/null-maybe-fp branch March 26, 2020 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants