diff options
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 3d70e7295..be0d90c0f 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]) |