No, you have to redefine it in a way that recurses.
proc deepCopy[T: ptr | ref](dst: var T, src: T) =
deepCopy(dst[], src[])
proc deepCopy[T: Ordinal | string | cstring | proc | set](dst: var T, src:
T) =
dst = src
proc deepCopy[I, T](dst: var array[I, T], src: array[I, T]) =
for i in low(src)..high(src):
deepCopy(dst[i], src[i])
proc deepCopy[T](dst: var seq[T], src: seq[T]) =
dst = newSeq[T](src.len)
for i in 0..<src.len:
deepCopy(dst[i], src[i])
proc deepCopy[T: object | tuple](dst: var T, src: T) =
# `fields` with 2 parameters doesn't work for object variants but we can
easily write a version of it that does, pretend we did so here
for a, b in fields(dst, src):
deepCopy(a, b)
# etc etc
Run