public static void CtorArrayWrongArrayType()
{
// Cannot pass variant array, if array type is not a valuetype.
string[] a = { "Hello" };
Assert.Throws<ArrayTypeMismatchException>(() => new Span<object>(a).DontBox());
Assert.Throws<ArrayTypeMismatchException>(() => new Span<object>(a, 0).DontBox());
Assert.Throws<ArrayTypeMismatchException>(() => new Span<object>(a, 0, a.Length).DontBox());
}