diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-04-18 14:02:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 14:02:10 +0200 |
commit | ed6160ad6d3019e86ba49dca00640fb8946ad69c (patch) | |
tree | 5dab70ac6cf438fb77470d3da4c35ffa3b91d352 /compiler | |
parent | 750f50b6c04e275207ec5d1aace478369e1acf9e (diff) | |
download | Nim-ed6160ad6d3019e86ba49dca00640fb8946ad69c.tar.gz |
callsite lineinfe for stackTrace template (#10785)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semtempl.nim | 8 |
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) |