Skip to content

Commit a7a3462

Browse files
committed
Implement CR feedback
1 parent ba99739 commit a7a3462

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1130UnitTests.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff 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
{

0 commit comments

Comments
 (0)