Thanks for the reply. > For now just drop the {.raises.} annotation, the compiler can compute this on > its own.
Yes, it works indeed, thanks a lot. I originally intended to make a lazy version of raiseException like this: import std/sugar proc raiseException* [E: CatchableError](e: () -> ref E; R: typedesc): (proc (): R {.raises: [E].}) = () => raise e() Run But then I ran into the same problem. It is OK though, I can work around it.