Fix S2368 FN: inline arrays #8100
Labels
Area: C#
C# rules related issues.
Area: C#12
C#12 related issues
Type: False Negative
Rule is NOT triggered when it should be.
An array of an inline array, while not being explicitly defined as a multidimensional or jagged array, has the same memory layout of those. Moreover, it is accessed in the same way (via double
[]
), and can be as "challenging for developers" (as mentioned by the RSPEC of S2368) and unintuitive as normal multidimensional arrays (c.p. this discussion).For these reasons, S2368 should report on them.
Related issues:
The text was updated successfully, but these errors were encountered: