diff --git a/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs b/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs index fe87ce26809bf5394e95895b5e360781e21792ed..efc79663444d4e02e07779c8cc86b9413baa1026 100644 --- a/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs +++ b/src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs @@ -237,7 +237,13 @@ private void VisitArray(IEnumerable list, string header, bool logElementCo { Debug.Assert(!string.IsNullOrEmpty(header)); - var elementCount = logElementCount ? $"({list.Count()})" : string.Empty; + var count = list.Count(); + if (count == 0) + { + return; + } + + var elementCount = logElementCount ? $"({count})" : string.Empty; Indent(); LogString($"{header}{elementCount}: "); VisitArray(list);