o_Is Supertype Of Integer Range Type
open override fun o_IsSupertypeOfIntegerRangeType(self: AvailObject, anIntegerRangeType: A_Type): Boolean
Content copied to clipboard
Integer range types compare like the subsets they represent. The only elements that matter in the comparisons are within one unit of the four boundary conditions (because these are the only places where the type memberships can change), so just use these. In particular, use the value just inside and the value just outside each boundary. If the subtype's constraints don't logically imply the supertype's constraints then the subtype is not actually a subtype. Make use of the fact that integer range types have their bounds canonized into inclusive form, if finite, at range type creation time.