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

Fix NRE in AssigningSymbolAndItsMemberInSameStatement analyzer #2894

Merged
merged 1 commit into from Oct 2, 2019

Conversation

mavasani
Copy link
Member

@mavasani mavasani commented Oct 2, 2019

Fixes #2889

@mavasani mavasani requested review from genlu and dotpaul October 2, 2019 17:59
@@ -80,8 +80,8 @@ private void AnalyzeAssignment(OperationAnalysisContext context)
{
assignmentOperation = (ISimpleAssignmentOperation)assignmentOperation.Value;

var operationValue = assignmentOperation.Target as T;
Copy link
Member Author

Choose a reason for hiding this comment

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

Time to start dogfooding C# 8 nullable references in the repo :-)

Any takers @dotnet/roslyn-analysis? Otherwise, I will try to get to it next sprint.

Copy link
Member Author

Choose a reason for hiding this comment

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

We had a similar NRE just a few weeks ago: https://github.com/dotnet/roslyn-analyzers/pull/2762/files

Copy link
Member

Choose a reason for hiding this comment

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

Is it just a matter of bumping roslyn version? Or are you actually proposing a full scale NRT roll out in this repo? :)


In reply to: 330693127 [](ancestors = 330693127)

Copy link
Member Author

Choose a reason for hiding this comment

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

We can do staged work if that is easier :) Planning to bump master branch to MS.CA 3.0 soon.

Copy link
Member

Choose a reason for hiding this comment

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

I suspect we might need to annotate the analyzer/codefix API's first in Roslyn, to have a cleaner annotation here.

Copy link
Member

@genlu genlu left a comment

Choose a reason for hiding this comment

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

:shipit:

@mavasani mavasani merged commit fe919bf into dotnet:master Oct 2, 2019
@mavasani mavasani deleted the Issue2889 branch October 2, 2019 18:48
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

Successfully merging this pull request may close these issues.

AD0001 - NullReferenceException when running CA2246
2 participants