summary refs log tree commit diff stats
path: root/tests/showoff/tdrdobbs_examples.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/showoff/tdrdobbs_examples.nim')
-rw-r--r--tests/showoff/tdrdobbs_examples.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/showoff/tdrdobbs_examples.nim b/tests/showoff/tdrdobbs_examples.nim
index 78f711325..8687ee529 100644
--- a/tests/showoff/tdrdobbs_examples.nim
+++ b/tests/showoff/tdrdobbs_examples.nim
@@ -105,10 +105,10 @@ proc pat2kind(pattern: string): FormulaKind =
 import macros
 
 proc matchAgainst(n, pattern: NimNode): NimNode {.compileTime.} =
-  template `@`(current, field: expr): expr =
+  template `@`(current, field: untyped): untyped =
     newDotExpr(current, newIdentNode(astToStr(field)))
 
-  template `==@`(n, pattern: expr): expr =
+  template `==@`(n, pattern: untyped): untyped =
     newCall("==", n@kind, newIdentNode($pat2kind($pattern.ident)))
 
   case pattern.kind
@@ -126,7 +126,7 @@ proc matchAgainst(n, pattern: NimNode): NimNode {.compileTime.} =
   else:
     error "invalid pattern"
 
-macro `=~` (n: Formula, pattern: expr): bool =
+macro `=~` (n: Formula, pattern: untyped): bool =
   result = matchAgainst(n, pattern)
 
 proc isPolyTerm2(n: Formula): bool = n =~ c * x^c