distinguish properly between nkOpen and nkClosedSymChoice

This commit is contained in:
Araq 2012-08-26 02:47:17 +02:00
commit b5b5e6e76d
15 changed files with 107 additions and 50 deletions

View file

@ -85,7 +85,7 @@ proc suggestObject(c: PContext, n: PNode, outputs: var int) =
proc nameFits(c: PContext, s: PSym, n: PNode): bool =
var op = n.sons[0]
if op.kind == nkSymChoice: op = op.sons[0]
if op.kind in {nkOpenSymChoice, nkClosedSymChoice}: op = op.sons[0]
var opr: PIdent
case op.kind
of nkSym: opr = op.sym.name