Open jtschuster opened 2 months ago
Analyzer will not warn that an element of a multidimensional array does not satisfy DAM constraints.
ArrayDataFlow.cs:
// Multidimensional Arrays not handled -- assumed to be UnknownValue [UnexpectedWarning ("IL2062", nameof (DataFlowTypeExtensions.RequiresPublicMethods), Tool.Trimmer | Tool.NativeAot, "")] [ExpectedWarning ("IL2062", nameof (DataFlowTypeExtensions.RequiresAll), Tool.Trimmer | Tool.NativeAot, "")] static void TestArrayWithInitializerOneElementStaticType () { Type[,] arr = new Type[,] { { typeof (TestType) } }; arr[0, 0].RequiresAll (); arr[0, 1].RequiresPublicMethods (); // Should warn - unknown value at this index }
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas See info in area-owners.md if you want to be subscribed.
Analyzer will not warn that an element of a multidimensional array does not satisfy DAM constraints.
ArrayDataFlow.cs: