About the count property of 64-bit integer ranges

Is the following (perhaps somewhat unexpected) behavior intentional and if so is it documented anywhere?

print( (UInt64.min ... UInt64.max).count ) // 0
print( (UInt64.min ..< UInt64.max).count ) // -1
print( (Int64.min ... Int64.max).count ) // 0
print( (Int64.min ..< Int64.max).count ) // -1

Related: SR-7948: Range<UInt>, Range<Int64>, Range<UInt64> (and ClosedRange) don't trap on overflow

2 Likes