summary refs log tree commit diff stats
path: root/tests/macros/tmacro5.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/macros/tmacro5.nim')
-rw-r--r--tests/macros/tmacro5.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/macros/tmacro5.nim b/tests/macros/tmacro5.nim
index d7a4fe8c8..802fb28d5 100644
--- a/tests/macros/tmacro5.nim
+++ b/tests/macros/tmacro5.nim
@@ -3,7 +3,7 @@ import macros,json
 var decls{.compileTime.}: seq[NimNode] = @[]
 var impls{.compileTime.}: seq[NimNode] = @[]
 
-macro importImpl_forward(name, returns): stmt {.immediate.} =
+macro importImpl_forward(name, returns: untyped): untyped =
   result = newNimNode(nnkEmpty)
   var func_name = newNimNode(nnkAccQuoted)
   func_name.add newIdentNode("import")
@@ -19,7 +19,7 @@ macro importImpl_forward(name, returns): stmt {.immediate.} =
   res[3].add returns
   var p1 = newNimNode(nnkIdentDefs)
   p1.add newIdentNode("dat")
-  p1.add newIdentNOde("PJsonNode")
+  p1.add newIdentNOde("JsonNode")
   p1.add newNimNode(nnkEmpty)
   res[3].add p1
   var p2 = newNimNode(nnkIdentDefs)
@@ -38,7 +38,7 @@ macro importImpl_forward(name, returns): stmt {.immediate.} =
   decls.add res
   echo(repr(res))
 
-macro importImpl(name, returns: expr, body: stmt): stmt {.immediate.} =
+macro importImpl(name, returns, body: untyped) =
   #var res = getAST(importImpl_forward(name, returns))
   discard getAST(importImpl_forward(name, returns))
   var res = copyNimTree(decls[decls.high])
@@ -46,7 +46,7 @@ macro importImpl(name, returns: expr, body: stmt): stmt {.immediate.} =
   echo repr(res)
   impls.add res
 
-macro okayy:stmt =
+macro okayy() =
   result = newNimNode(nnkStmtList)
   for node in decls: result.add node
   for node in impls: result.add node