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 committed by markspanbroek
parent 672248f431
commit 4a74d65e17
1 changed files with 1 additions and 1 deletions

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