From 173e8c49134c04c13870192884f6c1bf00cbe7e5 Mon Sep 17 00:00:00 2001 From: Steve Kellock Date: Tue, 9 Oct 2018 14:14:54 -0400 Subject: fixes unexpected transforming of runnableExamples (#9158) --- compiler/semtempl.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/semtempl.nim') 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 -- cgit 1.4.1-2-gfad0