3 ms·
> you cannot use subtype polymorphism to have a heterogeneous list of objects You can by using an existential type parameter, which 'forgets' the types in much
by willtim 8y ago
> you cannot use subtype polymorphism to have a heterogeneous list of objects
You can by using an existential type parameter, which 'forgets' the types in much the same way as an upcast.
[exists p. {x:int; p}]