callsite lineinfe for stackTrace template (#10785)

This commit is contained in:
Arne Döring 2019-04-18 14:02:10 +02:00 • committed by GitHub
commit ed6160ad6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -559,9 +559,11 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
else: else:
s = semIdentVis(c, skTemplate, n.sons[0], {}) s = semIdentVis(c, skTemplate, n.sons[0], {})
if s.owner != nil and sfSystemModule in s.owner.flags and if s.owner != nil:
s.name.s in ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]: const names = ["!=", ">=", ">", "incl", "excl", "in", "notin", "isnot"]
incl(s.flags, sfCallsite) 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) styleCheckDef(c.config, s)
onDef(n[0].info, s) onDef(n[0].info, s)