Skip to content

Fix assert in UsePatternMatching.CSharpAsAndNullCheckDiagnosticAnalyzer#32440

Merged
mavasani merged 2 commits intodotnet:masterfrom
mavasani:Issue31388
Jan 15, 2019
Merged

Fix assert in UsePatternMatching.CSharpAsAndNullCheckDiagnosticAnalyzer#32440
mavasani merged 2 commits intodotnet:masterfrom
mavasani:Issue31388

Conversation

@mavasani
Copy link
Contributor

  1. Bail out early if there is a reference to assigned local between the declaration and null check being replaced with pattern matching.
  2. Remove assert for bail out in presence of errors/unhandled cases.

Fixes #31388

1. Bail out early if there is a reference to assigned local between the declaration and null check being replaced with pattern matching.
2. Remove assert for bail out in presence of errors/unhandled cases.

Fixes dotnet#31388
@mavasani mavasani requested review from a team and CyrusNajmabadi January 14, 2019 20:29
@mavasani
Copy link
Contributor Author

@alrz

@mavasani
Copy link
Contributor Author

Much easier to review with https://github.com/dotnet/roslyn/pull/32440/files?w=1

@CyrusNajmabadi
Copy link
Contributor

Much easier to review with https://github.com/dotnet/roslyn/pull/32440/files?w=1

Appreciated :)

@mavasani
Copy link
Contributor Author

@vatsalyaagrawal @jinujoseph for approval

@jinujoseph jinujoseph added this to the 16.0.P3 milestone Jan 14, 2019
@mavasani mavasani merged commit 30192c3 into dotnet:master Jan 15, 2019
@mavasani mavasani deleted the Issue31388 branch January 15, 2019 01:56
xoofx pushed a commit to stark-lang/stark-roslyn that referenced this pull request Apr 16, 2019
Fix assert in UsePatternMatching.CSharpAsAndNullCheckDiagnosticAnalyzer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants