I do have to say `let list: seq[Parent] = @[Child()]` working is an odd
concept. Just cause generic parameters are convertible does not mean the
underlying type is. Consider the following:
type
Parent = ref object of RootObj
Child = ref object of Parent
MyType[T] = object
when T is Child:
a: int
else:
a: (int, int)
MyOtherType[T] = distinct int
var myTyp: MyType[Parent] = MyType[Child](a: 100)
var myOther: MyOtherType[Parent] = MyOtherType[Child](100)
Run
This means that for these implicit upcast conversions you need to traverse the
type, and see if the reason they're incompatible is only because of an
upcastable type. Otherwise you only specialist for string and have very odd
inconsistent type language since `var a: Table[string, Parent] = {"bleh":
Child().}.toTable` does not work