next steps in binding [] properly

This commit is contained in:
Araq 2015-09-13 22:42:21 +02:00
commit e01e0a4b40
4 changed files with 33 additions and 16 deletions

View file

@ -308,7 +308,7 @@ proc semResolvedCall(c: PContext, n: PNode, x: TCandidate): PNode =
let gp = finalCallee.ast.sons[genericParamsPos]
if gp.kind != nkEmpty:
if x.calleeSym.kind notin {skMacro, skTemplate}:
if x.calleeSym.magic == mArrPut:
if x.calleeSym.magic in {mArrGet, mArrPut}:
finalCallee = x.calleeSym
else:
finalCallee = generateInstance(c, x.calleeSym, x.bindings, n.info)