diff options
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r-- | compiler/semtempl.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 396696422..484a7ddd6 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -493,7 +493,9 @@ proc semTemplBody(c: var TemplCtx, n: PNode): PNode = else: result = semTemplBodySons(c, n) of nkCallKinds-{nkPostfix}: - result = semTemplBodySons(c, n) + # do not transform runnableExamples (bug #9143) + if not isRunnableExamples(n[0]): + result = semTemplBodySons(c, n) of nkDotExpr, nkAccQuoted: # dotExpr is ambiguous: note that we explicitly allow 'x.TemplateParam', # so we use the generic code for nkDotExpr too |