File tree Expand file tree Collapse file tree
StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,6 +221,26 @@ void MethodName()
221221 await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
222222 }
223223
224+ /// <summary>
225+ /// This is a regression test for DotNetAnalyzers/StyleCopAnalyzers#1777.
226+ /// </summary>
227+ /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
228+ [ Fact ]
229+ public async Task TestEmptyStatementAfterCallAsync ( )
230+ {
231+ string testCode = @"using System;
232+ class ClassName
233+ {
234+ void MethodName()
235+ {
236+ Console.WriteLine();;
237+ }
238+ }
239+ " ;
240+
241+ await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
242+ }
243+
224244 [ Fact ]
225245 public async Task TestSingleLineAccessorsAsync ( )
226246 {
You can’t perform that action at this time.
0 commit comments