I wonder why you use at all
B = object of A
Run
when you do not want to enable passing B where A is expected.
But it is easy to enforce a compile time error, add
proc f(T: typedesc[B]) {.error.}
Run
