File tree Expand file tree Collapse file tree
StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,34 @@ public void Test()
8484 await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
8585 }
8686
87+ [ Fact ]
88+ public async Task TestDelegateUseAsMethodArgumentsWithNonConflictingExpressionOverloadAsync ( )
89+ {
90+ var testCode = @"
91+ using System;
92+ using System.Linq.Expressions;
93+ public class TypeName
94+ {
95+ public void Test(Action argument)
96+ {
97+
98+ }
99+
100+ public void Test(Expression<Func<int>> argument)
101+ {
102+
103+ }
104+
105+ public void Test()
106+ {
107+ Test(delegate { });
108+ }
109+ }" ;
110+ var expected = this . CSharpDiagnostic ( ) . WithLocation ( 18 , 14 ) ;
111+
112+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
113+ }
114+
87115 /// <inheritdoc/>
88116 protected override IEnumerable < DiagnosticAnalyzer > GetCSharpDiagnosticAnalyzers ( )
89117 {
You can’t perform that action at this time.
0 commit comments