Mark generated error variable explicitly as {.gensym.}

Co-Authored-By: Jaremy Creechley <creechley@gmail.com>
This commit is contained in:
Mark Spanbroek 2024-01-09 13:50:23 +01:00
parent 2dbb7027e4
commit af702731a5

View File

@ -34,7 +34,7 @@ macro without*(condition, errorname, body: untyped): untyped =
let body = body.undoSymbolResolution(errorIdent) let body = body.undoSymbolResolution(errorIdent)
quote do: quote do:
var error: ref CatchableError var error {.gensym.}: ref CatchableError
without captureBindError(error, `condition`): without captureBindError(error, `condition`):
template `errorIdent`: ref CatchableError = error template `errorIdent`: ref CatchableError = error