You can use the compiles special function to do a ton of this work:
[https://play.nim-lang.org/#ix=25sG](https://play.nim-lang.org/#ix=25sG) proc echo2(s: string): string = "" template returnsVoid(f: untyped): bool = compiles: let v = f echo returnsVoid(echo(":)")) echo returnsVoid(echo2(":)")) Run false true Run
