@andrea Right. And even for a _proc_ returning a non-concrete type (the
original question), calling code would have to know the size of the thing it
gets back, so that cannot work.
As I understand it now:
type
C = concept c
c.num is int
Cvt = vtref C # a VTable type, not yet implemented
A = object of RootObj
name: string
num: int
B = object of RootObj
rate: float
num: int
var
a = A(name: "me", num: 1)
b = B(rate: 3.2, num: 2)
s1: seq[RootObj] = @[a, b] # this works, type erasure by base type
s2: seq[C] = @[a, b] # this cannot work because C isn't concrete:
e.g.
# the size of a C is unknown
s3: seq[Cvt] = @[a, b] # this should work when VTable types are here