I shared some details on subtyping, variance and higher-order types coming to Literal 2. This is more of an internal capability of the type system; I’ll share more details about some of the features it powers soon.
Literal 2 feature preview: Variance and higher-order types
Literal 2 can tell whether one type is a subtype of another. The rule: type a is a subtype of type b if it can be proven that every object permitted by a is also permitted by b. These comparisons work...
rubyforum.org