first attempt to fix 'a[i]' handling in generics
This commit is contained in:
parent
2a797c362a
commit
8ef66b973d
13 changed files with 153 additions and 7 deletions
|
|
@ -308,7 +308,10 @@ 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}:
|
||||
finalCallee = generateInstance(c, x.calleeSym, x.bindings, n.info)
|
||||
if x.calleeSym.magic == mArrPut:
|
||||
finalCallee = x.calleeSym
|
||||
else:
|
||||
finalCallee = generateInstance(c, x.calleeSym, x.bindings, n.info)
|
||||
else:
|
||||
# For macros and templates, the resolved generic params
|
||||
# are added as normal params.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue