fixes nim-lang/nimsuggest#103 con dot exprs (#16657)

- con calls for dot exprs now returns results
- discovered an issue with dot expr results -- documented
This commit is contained in:
Saem Ghani 2021-01-12 04:35:21 -08:00 • committed by GitHub
commit bb3c6d0797
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 2 deletions

View file

@ -298,6 +298,7 @@ proc suggestObject(c: PContext, n, f: PNode; info: TLineInfo, outputs: var Sugge
proc nameFits(c: PContext, s: PSym, n: PNode): bool =
var op = if n.kind in nkCallKinds: n[0] else: n
if op.kind in {nkOpenSymChoice, nkClosedSymChoice}: op = op[0]
if op.kind == nkDotExpr: op = op[1]
var opr: PIdent
case op.kind
of nkSym: opr = op.sym.name