summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-04-18 14:02:10 +0200
committerGitHub <noreply@github.com>2019-04-18 14:02:10 +0200
commited6160ad6d3019e86ba49dca00640fb8946ad69c (patch)
tree5dab70ac6cf438fb77470d3da4c35ffa3b91d352
parent750f50b6c04e275207ec5d1aace478369e1acf9e (diff)
downloadNim-ed6160ad6d3019e86ba49dca00640fb8946ad69c.tar.gz
callsite lineinfe for stackTrace template (#10785)
-rw-r--r--compiler/semtempl.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index cbb7a95c9..2854c90ae 100644
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -559,9 +559,11 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
   else:
     s = semIdentVis(c, skTemplate, n.sons[0], {})
 
-  if s.owner != nil and sfSystemModule in s.owner.flags and
-      s.name.s in ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]:
-    incl(s.flags, sfCallsite)
+  if s.owner != nil:
+    const names = ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]
+    if sfSystemModule in s.owner.flags and s.name.s in names or
+       s.owner.name.s == "vm" and s.name.s == "stackTrace":
+      incl(s.flags, sfCallsite)
 
   styleCheckDef(c.config, s)
   onDef(n[0].info, s)