summary refs log tree commit diff stats
path: root/compiler/guards.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/guards.nim')
-rw-r--r--compiler/guards.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/guards.nim b/compiler/guards.nim
index a5e6058c9..94af5202d 100644
--- a/compiler/guards.nim
+++ b/compiler/guards.nim
@@ -768,8 +768,10 @@ macro `=~`(x: PNode, pat: untyped): bool =
 
   var conds = newTree(nnkBracket)
   m(x, pat, conds)
-  when declared(macros.toNimIdent):
-    result = nestList(toNimIdent"and", conds)
+  when compiles(nestList(ident"and", conds)):
+    result = nestList(ident"and", conds)
+  #elif declared(macros.toNimIdent):
+  #  result = nestList(toNimIdent"and", conds)
   else:
     result = nestList(!"and", conds)