GenericType<object>.test();
}
+ struct SomeGenStruct1<T>
+ {
+ public T o;
+ public int i;
+ public long l;
+ public long l1;
+ }
+
+ public class GenericType1<T>
+ {
+ public static void test()
+ {
+ int[] lengths = { 42, 2, 3 };
+ SomeGenStruct1<T>[,,] array = (SomeGenStruct1<T>[,,])Array.CreateInstance(typeof(SomeGenStruct1<T>), lengths);
+
+ for (int i = 0; i < 42; i++)
+ {
+ array[i,0,0].o = default(T);
+ array[i,0,0].i = GetIntPtrOnHeapAsInt();
+ array[i,0,0].l = GetIntPtrOnHeapAsInt();
+
+ array[i,1,2].o = default(T);
+ array[i,1,2].i = GetIntPtrOnHeapAsInt();
+ array[i,1,2].l = GetIntPtrOnHeapAsLong();
+
+ array[i,1,1].o = default(T);
+ array[i,1,1].i = GetIntPtrOnHeapAsInt();
+ array[i,1,1].l = GetIntPtrOnHeapAsLong();
+ }
+
+ GC.Collect();
+
+ GC.KeepAlive(array);
+
+ RuntimeTypeHandle arrayTypeHandle = array.GetType().TypeHandle;
+#if INTERNAL_CONTRACTS
+ Assert.IsTrue(RuntimeAugments.IsDynamicType(arrayTypeHandle));
+#endif
+ }
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ [TestMethod]
+ public static void testMDArrayWithPointerLikeValuesOfKnownStructTypeLargerType()
+ {
+ GenericType1<object>.test();
+ }
+
[MethodImpl(MethodImplOptions.NoInlining)]
[TestMethod]
public static void testMDArrayWithPointerLikeValuesOfUnknownStructReferenceType()
new CoreFXTestLibrary.Internal.TestInfo("B282745.testIntMDArrayWithPointerLikeValues", () => global::B282745.testIntMDArrayWithPointerLikeValues(), null),
new CoreFXTestLibrary.Internal.TestInfo("B282745.testLongMDArrayWithPointerLikeValues", () => global::B282745.testLongMDArrayWithPointerLikeValues(), null),
new CoreFXTestLibrary.Internal.TestInfo("B282745.testMDArrayWithPointerLikeValuesOfKnownStructType", () => global::B282745.testMDArrayWithPointerLikeValuesOfKnownStructType(), null),
+new CoreFXTestLibrary.Internal.TestInfo("B282745.testMDArrayWithPointerLikeValuesOfKnownStructTypeLargerType", () => global::B282745.testMDArrayWithPointerLikeValuesOfKnownStructTypeLargerType(), null),
new CoreFXTestLibrary.Internal.TestInfo("B282745.testMDArrayWithPointerLikeValuesOfUnknownStructReferenceType", () => global::B282745.testMDArrayWithPointerLikeValuesOfUnknownStructReferenceType(), null),
new CoreFXTestLibrary.Internal.TestInfo("B282745.testMDArrayWithPointerLikeValuesOfUnknownStructPrimitiveType", () => global::B282745.testMDArrayWithPointerLikeValuesOfUnknownStructPrimitiveType(), null),
new CoreFXTestLibrary.Internal.TestInfo("B282745.testMDArrayWith3Dimensions", () => global::B282745.testMDArrayWith3Dimensions(), null),