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
|
|
@ -1164,7 +1164,7 @@ proc semAsgn(c: PContext, n: PNode): PNode =
|
|||
if lhsIsResult: {efAllowDestructor} else: {})
|
||||
if lhsIsResult:
|
||||
n.typ = enforceVoidContext
|
||||
if lhs.sym.typ.isMetaType:
|
||||
if lhs.sym.typ.isMetaType and lhs.sym.typ.kind != tyTypeDesc:
|
||||
if cmpTypes(c, lhs.typ, rhs.typ) == isGeneric:
|
||||
internalAssert c.p.resultSym != nil
|
||||
lhs.typ = rhs.typ
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue