summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2017-05-16 23:09:19 +0300
committerAndreas Rumpf <rumpf_a@web.de>2017-05-16 22:09:19 +0200
commit6599cae2810148d0a36d9c2d9be964d73c514559 (patch)
tree95b27fbba89eee58655821fe471436ffde61548e /compiler
parent8d3f477fada2883ecc312f9342a9847d25fcf741 (diff)
downloadNim-6599cae2810148d0a36d9c2d9be964d73c514559.tar.gz
Async macro fixes (#5739)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semstmts.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index c7f27f0a2..a1a33d889 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -982,6 +982,9 @@ proc semProcAnnotation(c: PContext, prc: PNode;
     var x = newNodeI(nkCall, n.info)
     x.add(newSymNode(m))
     prc.sons[pragmasPos] = copyExcept(n, i)
+    if prc[pragmasPos].kind != nkEmpty and prc[pragmasPos].len == 0:
+      prc.sons[pragmasPos] = emptyNode
+
     if it.kind == nkExprColonExpr:
       # pass pragma argument to the macro too:
       x.add(it.sons[1])