diff options
author | deansher <deansherthompson@gmail.com> | 2019-01-28 08:12:24 -0500 |
---|---|---|
committer | deansher <deansherthompson@gmail.com> | 2019-01-28 08:12:24 -0500 |
commit | d60f8ab99181ea18cc534728ba4d0470c0ca1bce (patch) | |
tree | 64cef5bc336a6d0038dcb47a4e3b1cd30ed434d7 /compiler/semtempl.nim | |
parent | a6de0274ee768d135bab280d2b2700a0bb475300 (diff) | |
parent | 9402c82e803d133e0b845a7c5c79c261781e7d8d (diff) | |
download | Nim-d60f8ab99181ea18cc534728ba4d0470c0ca1bce.tar.gz |
Merge remote-tracking branch 'upstream/devel' into devel
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r-- | compiler/semtempl.nim | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 14507cf9d..d920a54b8 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -58,25 +58,26 @@ proc symChoice(c: PContext, n: PNode, s: PSym, r: TSymChoiceRule): PNode = inc(i) if i > 1: break a = nextOverloadIter(o, c, n) + let info = getCallLineInfo(n) if i <= 1 and r != scForceOpen: # XXX this makes more sense but breaks bootstrapping for now: # (s.kind notin routineKinds or s.magic != mNone): # for instance 'nextTry' is both in tables.nim and astalgo.nim ... - result = newSymNode(s, n.info) - markUsed(c.config, n.info, s, c.graph.usageSym) - onUse(n.info, s) + result = newSymNode(s, info) + markUsed(c.config, info, s, c.graph.usageSym) + onUse(info, s) else: # semantic checking requires a type; ``fitNode`` deals with it # appropriately let kind = if r == scClosed or n.kind == nkDotExpr: nkClosedSymChoice else: nkOpenSymChoice - result = newNodeIT(kind, n.info, newTypeS(tyNone, c)) + result = newNodeIT(kind, info, newTypeS(tyNone, c)) a = initOverloadIter(o, c, n) while a != nil: if a.kind != skModule: incl(a.flags, sfUsed) - addSon(result, newSymNode(a, n.info)) - onUse(n.info, a) + addSon(result, newSymNode(a, info)) + onUse(info, a) a = nextOverloadIter(o, c, n) proc semBindStmt(c: PContext, n: PNode, toBind: var IntSet): PNode = |