Templates will pick the candidate in the nearest scope when symbols are mixed-in
This commit is contained in:
parent
754e2ef1db
commit
8f3d5a25a6
6 changed files with 32 additions and 16 deletions
|
|
@ -421,6 +421,7 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
|
|||
else:
|
||||
s = semIdentVis(c, skTemplate, n.sons[0], {})
|
||||
# check parameter list:
|
||||
s.scope = c.currentScope
|
||||
pushOwner(s)
|
||||
openScope(c)
|
||||
n.sons[namePos] = newSymNode(s, n.sons[namePos].info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue