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 @@ -345,6 +345,24 @@ public class TestClass
345345 await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
346346 }
347347
348+ [ Fact ]
349+ [ WorkItem ( 2211 , "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2211" ) ]
350+ public async Task TestStaticMemberAliasesPropertyAsync ( )
351+ {
352+ var testCode = @"
353+ using System;
354+
355+ public class Foo
356+ {
357+ public Array Array { get; } = new int[0];
358+
359+ public int IndexOf(object value) => Array.IndexOf(this.Array, value);
360+ }
361+ " ;
362+
363+ await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
364+ }
365+
348366 protected override IEnumerable < DiagnosticAnalyzer > GetCSharpDiagnosticAnalyzers ( )
349367 {
350368 yield return new SA1101PrefixLocalCallsWithThis ( ) ;
You can’t perform that action at this time.
0 commit comments