From 15c208cd29313c0888900644f0d516541d3832fc Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 22 Feb 2019 18:28:40 +0100 Subject: [PATCH] it's spelt callsite --- compiler/ast.nim | 2 +- compiler/evaltempl.nim | 2 +- compiler/semtempl.nim | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/ast.nim b/compiler/ast.nim index fbe6132b3..564a3406b 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -271,7 +271,7 @@ type # language; for interfacing with Objective C sfDiscardable, # returned value may be discarded implicitly sfOverriden, # proc is overriden - sfCallSideLineinfo# A flag for template symbols to tell the + sfCallsite # A flag for template symbols to tell the # compiler it should use line information from # the calling side of the macro, not from the # implementation. diff --git a/compiler/evaltempl.nim b/compiler/evaltempl.nim index 43c038270..14388367a 100644 --- a/compiler/evaltempl.nim +++ b/compiler/evaltempl.nim @@ -186,7 +186,7 @@ proc evalTemplate*(n: PNode, tmpl, genSymOwner: PSym; renderTree(result, {renderNoComments})) else: result = copyNode(body) - ctx.instLines = sfCallSideLineinfo in tmpl.flags + ctx.instLines = sfCallsite in tmpl.flags if ctx.instLines: result.info = n.info for i in countup(0, safeLen(body) - 1): diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index f180b5373..dae2833ec 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -559,8 +559,9 @@ proc semTemplateDef(c: PContext, n: PNode): PNode = else: s = semIdentVis(c, skTemplate, n.sons[0], {}) - if s.owner != nil and s.owner.name.s == "system" and s.name.s in ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]: - incl(s.flags, sfCallSideLineinfo) + if s.owner != nil and sfSystemModule in s.owner.flags and + s.name.s in ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]: + incl(s.flags, sfCallsite) styleCheckDef(c.config, s) onDef(n[0].info, s)