Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update a test
  • Loading branch information
vitek-karas committed Aug 1, 2022
commit 8e69f9b2cc1729b67aeee149ecb336f9f05542cb
10 changes: 10 additions & 0 deletions test/Mono.Linker.Tests.Cases/DataFlow/ArrayDataFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ public static void Test ()
TestArrayResetGetElementOnByRefArray ();
TestArrayResetAfterCall ();
TestArrayResetAfterAssignment ();

TestAddressOfElement ();
}

[ExpectedWarning ("IL2062", nameof (DataFlowTypeExtensions.RequiresPublicMethods), ProducedBy = ProducedBy.Trimmer | ProducedBy.NativeAot)]
Expand Down Expand Up @@ -512,6 +514,14 @@ static void TestArrayResetAfterAssignment ()
arr[0, 0].RequiresPublicFields (); // Should warn
}

[ExpectedWarning ("IL2062", nameof (DataFlowTypeExtensions.RequiresPublicMethods), ProducedBy = ProducedBy.Trimmer | ProducedBy.NativeAot)]
static void TestAddressOfElement ()
{
Type[,] arr = new Type[,] { { typeof (TestType) } };
ref Type t = ref arr[0, 0];
t.RequiresPublicMethods ();
}

static Type[,] _externalArray;
}

Expand Down