From a6d44212415ba06ec4dff225246110d735e8ac43 Mon Sep 17 00:00:00 2001 From: Aditya Siram Date: Mon, 13 May 2019 18:34:32 -0500 Subject: Fixes #9365 : let with exportC pragma in template. (#11235) * Fixes #9365 : let with exportC pragma in template. * Fix according to comments. --- compiler/semtempl.nim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler') diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 01a0a41bb..2cbbd7b54 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -197,6 +197,12 @@ proc addLocalDecl(c: var TemplCtx, n: var PNode, k: TSymKind) = else: replaceIdentBySym(c.c, n, ident) else: + if (n.kind == nkPragmaExpr and sonsLen(n) >= 2 and n.sons[1].kind == nkPragma): + let pragmaNode = n.sons[1] + for i in 0..