Skip to content

Commit

Permalink
Fix RS1034 suggestion to use IsKind instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmalinowski committed Jan 19, 2022
1 parent 98dd266 commit 2adbba5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using OmniSharp.Mef;
Expand Down Expand Up @@ -466,7 +467,7 @@ public void Baz() {
var compilationUnit = decompiledTree.GetCompilationUnitRoot();

// second comment should indicate we have decompiled
var comments = compilationUnit.DescendantTrivia().Where(t => t.Kind() == SyntaxKind.SingleLineCommentTrivia).ToArray();
var comments = compilationUnit.DescendantTrivia().Where(t => t.IsKind(SyntaxKind.SingleLineCommentTrivia)).ToArray();
Assert.NotNull(comments);
Assert.Equal("// Decompiled with ICSharpCode.Decompiler 7.1.0.6543", comments[1].ToString());

Expand Down

0 comments on commit 2adbba5

Please sign in to comment.