Skip to content

Commit

Permalink
Mark generated error variable explicitly as {.gensym.}
Browse files Browse the repository at this point in the history
Co-Authored-By: Jaremy Creechley <creechley@gmail.com>
  • Loading branch information
markspanbroek and elcritch committed Jan 9, 2024
1 parent 672248f commit 4a74d65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion questionable/withoutresult.nim
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ macro without*(condition, errorname, body: untyped): untyped =
let body = body.undoSymbolResolution(errorIdent)

quote do:
var error: ref CatchableError
var error {.gensym.}: ref CatchableError

without captureBindError(error, `condition`):
template `errorIdent`: ref CatchableError = error
Expand Down

0 comments on commit 4a74d65

Please sign in to comment.