compiler/sem*: improve lineinfo for qualified and generic procs (#10427)

Previously the compiler will believe these are where `newSeq` symbol
starts:

    newSeq[int]()
          ^
    system.newSeq[int]()
                 ^

This commit moves them back to:

    newSeq[int]()
    ^
    system.newSeq[int]()
           ^
This commit is contained in:
alaviss 2019-01-23 15:24:21 +07:00 • committed by Andreas Rumpf
commit e962be8981
5 changed files with 56 additions and 19 deletions

View file

@ -1171,9 +1171,10 @@ proc semSym(c: PContext, n: PNode, sym: PSym, flags: TExprFlags): PNode =
onUse(n.info, s)
result = newSymNode(s, n.info)
else:
markUsed(c.config, n.info, s, c.graph.usageSym)
onUse(n.info, s)
result = newSymNode(s, n.info)
let info = getCallLineInfo(n)
markUsed(c.config, info, s, c.graph.usageSym)
onUse(info, s)
result = newSymNode(s, info)
proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
## returns nil if it's not a built-in field access