Have you tried
proc f(L, R: typedesc): typedesc =
when L is int32 and R is int64: int32
...
proc add*[L,R](lhs: L, rhs: R) : f(L, R)
Have not tried it, but I think it should work
Have you tried
proc f(L, R: typedesc): typedesc =
when L is int32 and R is int64: int32
...
proc add*[L,R](lhs: L, rhs: R) : f(L, R)
Have not tried it, but I think it should work