summary refs log tree commit diff stats
path: root/tests/showoff/tformatopt.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/showoff/tformatopt.nim')
-rw-r--r--tests/showoff/tformatopt.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/showoff/tformatopt.nim b/tests/showoff/tformatopt.nim
index f33ed6921..420dd026b 100644
--- a/tests/showoff/tformatopt.nim
+++ b/tests/showoff/tformatopt.nim
@@ -10,7 +10,7 @@ import macros
 proc invalidFormatString() =
   echo "invalidFormatString"
 
-template formatImpl(handleChar: expr) =
+template formatImpl(handleChar: untyped) =
   var i = 0
   while i < f.len:
     if f[i] == '$':
@@ -29,15 +29,15 @@ template formatImpl(handleChar: expr) =
       i += 1
 
 proc `%`*(f: string, a: openArray[string]): string =
-  template identity(x: expr): expr = x
+  template identity(x: untyped): untyped = x
   result = ""
   formatImpl(identity)
 
-macro optFormat{`%`(f, a)}(f: string{lit}, a: openArray[string]): expr =
+macro optFormat{`%`(f, a)}(f: string{lit}, a: openArray[string]): untyped =
   result = newNimNode(nnkBracket)
   let f = f.strVal
   formatImpl(newLit)
-  result = nestList(!"&", result)
+  result = nestList(newIdentNode("&"), result)
 
 template optAdd1{x = y; add(x, z)}(x, y, z: string) =
   x = y & z