diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-11-07 11:57:17 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-11-07 14:20:39 +0100 |
commit | f69ee294c8451c10b6d8159b74c5248980261431 (patch) | |
tree | f455b13367a96fde3c03d7fd92407d22eaad0778 | |
parent | 14a0182ca68a33cb53cfd28383f47ce37977721c (diff) | |
download | Nim-f69ee294c8451c10b6d8159b74c5248980261431.tar.gz |
bugfix that enables the 'since' template [backport]
-rw-r--r-- | compiler/semstmts.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index ace2c7966..3cdf1efb2 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1441,8 +1441,13 @@ proc semProcAnnotation(c: PContext, prc: PNode; continue doAssert r.sons[0].kind == nkSym - # Expand the macro here - result = semMacroExpr(c, r, r, r.sons[0].sym, {}) + let m = r.sons[0].sym + case m.kind + of skMacro: result = semMacroExpr(c, r, r, m, {}) + of skTemplate: result = semTemplateExpr(c, r, m, {}) + else: + prc.sons[pragmasPos] = n + continue doAssert result != nil |