Why does initializing a negatively-sized array cause an overflow exception?
This behaviour is explicitly specified in C# language specification, section 12.8.16.5

The result of evaluating an array creation expression is classified as
a value, namely a reference to the newly allocated array instance. The
run-time processing of an array creation expression consists of the
following steps:
(...)

The computed values for the dimension lengths are validated, as follows: If one or more of the values are less than zero, a
System.OverflowException is thrown and no further steps are executed.


(emphasis mine)

I was unit testing in C#, and I found the following code gives an overflow exception:
using System;
                    
public class Program
{
    public static void Main()
    {
        int i = 0;
        Console.WriteLine(new float[i - 1]);
        // System.OverflowException: Arithmetic operation resulted in an overflow.
    }
}

https://dotnetfiddle.net/clbgZ3
However, if you explicitly attempt to initialize a negative array, you get the following error:
Console.WriteLine(new float[-1]);
// Compilation error: Cannot create an array with a negative size

Why does initializing a negatively-sized array cause an overflow exception, and not a different type of error?
