Skip to content

Move null check above where the variable is used#46558

Merged
davidwengier merged 2 commits intodotnet:masterfrom
davidwengier:FixNREInCastSimplifier
Aug 7, 2020
Merged

Move null check above where the variable is used#46558
davidwengier merged 2 commits intodotnet:masterfrom
davidwengier:FixNREInCastSimplifier

Conversation

@davidwengier
Copy link
Member

Fixes #46423

ClassifyConversion validates the parameter is not null.

@davidwengier davidwengier requested a review from a team as a code owner August 5, 2020 07:33
@davidwengier
Copy link
Member Author

@RikkiGibson this is another tiny one. It hasn't passed CI yet, but its 5:3pm Friday for me so I'm not waiting :P

@davidwengier davidwengier merged commit 6873932 into dotnet:master Aug 7, 2020
@ghost ghost added this to the Next milestone Aug 7, 2020
@davidwengier davidwengier deleted the FixNREInCastSimplifier branch August 7, 2020 20:14
333fred added a commit that referenced this pull request Aug 10, 2020
…features/function-pointers

* upstream/master: (465 commits)
  Stop specifying Rich Nav's version of dotnet
  Fix nullable reference warning
  Fix up some calls to SymbolKey.Resolve now that it's annotated
  Remove try/catch of ArgumentException
  Null annotate SymbolKey
  Annotate Location.IsInSource as ensuring SourceTree is non-null
  Fix nullable annotation of Compilation.CreateErrorTypeSymbol
  Update null state for add/remove on field-like events (#46477)
  Throw IndexOutOfRangeException from BitVector.this[int] if index < 0 (#46627)
  Delete some dead support for changing legacy options
  Delete our use of Microsoft.VisualStudio.CodingConventions
  Fix crash in the preview of a code action that modified an .editorconfig
  Move null check above where the variable is used (#46558)
  Add integration test to configure diagnostic severity via editorconfig
  Disable a few Mac tests
  Consider nullability in conversion to constraint type (#46405)
  Added interpolated strings and tests
  Introduce request context (#46557)
  Simplify NativeIntegerAttribute encoding (#46522)
  Update extension getenumerator status. (#46607)
  ...
@RikkiGibson RikkiGibson modified the milestones: Next, 16.8.P2 Aug 11, 2020
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.

NRE in RemoveUnnecessaryCast.CSharpRemoveUnnecessaryCastDiagnosticAnalyzer

4 participants