This currently breaks:
import std/[genasts, macros]
macro mockable*(p: typed): untyped =
when defined(mock):
let
pName = ident($p[0])
newName = ident($p[0] & "Base")
oldPrc = p.copyNimTree
oldPrc[0] = newName
result = genast(pName, oldPrc, newName):
oldPrc
var pName* = newName
else:
result = p
proc toString*[T](x: T): string {.mockable.} = $x
/home/philipp/dev/playground/src/playground.nim(18, 35) template/generic instantiation of `mockable` from here
/usr/lib/nim/std/genasts.nim(87, 13) Error: 'toStringBase' doesn't have a concrete type, due to unspecified generic parameters.
This currently breaks: