Permalink
Browse files

Merge pull request #32159 from sharwell/fix-nre

Fix null check combined with nullable bool test
  • Loading branch information...
sharwell committed Jan 10, 2019
2 parents 8fa41de + c010b18 commit 07eee6e9cf45441535af3d947ff8011292ba3bc7
@@ -28,7 +28,7 @@ jobs:
_configuration: Debug
release:
_configuration: Release
timeoutInMinutes: 90
timeoutInMinutes: 135

steps:
- script: eng/cibuild.cmd -configuration $(_configuration) -prepareMachine -testVsi
@@ -270,7 +270,12 @@ function TestUsingOptimizedRunner() {
$dlls = $dlls | ?{ -not ($_.FullName -match ".*/ref/.*") }

if ($ci) {
$args += " -xml -timeout:65"
$args += " -xml"
if ($testVsi) {
$args += " -timeout:120"
} else {
$args += " -timeout:65"
}
}

$procdumpPath = Ensure-ProcDump
@@ -149,7 +149,7 @@ internal static class DiagnosticResultSerializer

if (document?.SupportsDiagnostics() == false)
{
// drop diagnostics for document that doesn't support
// drop diagnostics for non-null document that doesn't support
// diagnostics
continue;
}
@@ -113,7 +113,12 @@ public void AddExternalSemanticDiagnostics(DocumentId documentId, IEnumerable<Di

private void AppendDiagnostics(ref Dictionary<DocumentId, List<DiagnosticData>> map, Document documentOpt, Diagnostic diagnostic)
{
if (documentOpt?.SupportsDiagnostics() == false)
if (documentOpt is null)
{
return;
}

if (!documentOpt.SupportsDiagnostics())
{
return;
}

0 comments on commit 07eee6e

Please sign in to comment.