From 388797861d09ef8fc497aa4dfbb46304834d8a17 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Thu, 27 Jul 2023 20:08:33 -0700 Subject: [PATCH] add kind check --- questionable/withoutresult.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/questionable/withoutresult.nim b/questionable/withoutresult.nim index 17cd333..8206aca 100644 --- a/questionable/withoutresult.nim +++ b/questionable/withoutresult.nim @@ -21,7 +21,8 @@ proc undoSymbolResolution(expression, ident: NimNode): NimNode = macro without*(condition, errorname, body: untyped): untyped = ## Used to place guards that ensure that a Result contains a value. ## Exposes error when Result does not contain a value. - + + errorname.expectKind(nnkIdent) let errorIdent = ident $errorname # Nim's early symbol resolution might have picked up a symbol with the