Closed asoffer closed 3 years ago
As discussed in #51, we will move to having a constant numeric type which implicitly converts to all others (more details in that issue). This nicely resolves this issue as well; the array length field must be a non-negative integral constant.
Currently array lengths need to be integral but will be implicitly cast to the underlying array-type's length implementation type. This is currently a
uint64_t
so any natively supported type in Icarus can convert to this losslessly (because negative lengths are prohibited). However, if Icarus starts supporting larger integer types this cast will be lossy and implicit.This issue tracks simply making a decision here. There is a nice consistency in always requiring the cast. There is also no reason to support arrays of length 2^64 or greater in any reasonable future.