Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Assert.True(!typeof(ContextBoundClass).IsContextful);
}
+ [Fact]
+ public void MakeGenericType_NonRuntimeType()
+ {
+ foreach (Type nonRuntimeType in Helpers.NonRuntimeTypes)
+ {
+ Type t = typeof(List<>).MakeGenericType(nonRuntimeType);
+ Assert.NotNull(t);
+ }
+ }
+
#region GetInterfaceMap tests
public static IEnumerable<object[]> GetInterfaceMap_TestData()
{
for (int iCopy = 0; iCopy < instantiation.Length; iCopy++)
instantiationCopy[iCopy] = instantiation[iCopy];
instantiation = instantiationCopy;
-
- throw new NotImplementedException();
+ if (!RuntimeFeature.IsDynamicCodeSupported)
+ throw new PlatformNotSupportedException();
+ return System.Reflection.Emit.TypeBuilderInstantiation.MakeGenericType(this, instantiation);
}
instantiationRuntimeType[i] = rtInstantiationElem;