suggest: try to find the implementation of a symbol when def is used (#15555)

* suggest: try to find the implementation of a symbol when def is used

* suggest: return all declarations of the symbol on `def`
This commit is contained in:
alaviss 2020-10-14 10:08:56 -05:00 • committed by GitHub
commit c2ba4ef979
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 7 deletions

View file

@ -1943,6 +1943,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
if not comesFromShadowScope:
excl(proto.flags, sfForward)
incl(proto.flags, sfWasForwarded)
suggestSym(c.config, s.info, proto, c.graph.usageSym)
closeScope(c) # close scope with wrong parameter symbols
openScope(c) # open scope for old (correct) parameter symbols
if proto.ast[genericParamsPos].kind != nkEmpty: