Ask Epic: Verse - March 28 @ 10:00 AM ET

Yes, this will be supported, but will have some limitations. In particular, subtyping of parametric types is determined by first matching on the traditional inheritance graph. Then, once a match is found, structurally matching. For example,

class1(t:type) := class {}
X:class1(int) = class1(float){}

succeeds - class1 is via the traditional inheritance graph a subtype of class1, and there is no structure to match, so the subtyping succeeds. That same behavior would need to occur at runtime for casting. However, that structural match is much harder to deal with at runtime where static types may not be present for a variety of values - functions, in particular.

1 Like