Skip to content

Commit

Permalink
Code review 2
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa committed Sep 27, 2023
1 parent fb31d3c commit 77f835f
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,20 @@ public void AMethod2(params IntMatrix a) { } // Compliant
}
}

// https://github.com/SonarSource/sonar-dotnet/issues/8100
namespace Repro_8100
{
public class InlineArrays
{
public void AMethod1(Buffer[] a) { } // FN, Buffer[] is 2-dimensional
public void AMethod1(Buffer[,] a) { } // Noncompliant, Buffer[,] is 3-dimensional
public void AMethod2(params Buffer[] a) { } // Compliant, params of Buffer
public void AMethod3(params Buffer[][] a) { } // FN, params of Buffer[]
}

[System.Runtime.CompilerServices.InlineArray(10)]
public struct Buffer
{
int arrayItem;
}
}

0 comments on commit 77f835f

Please sign in to comment.