summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-12-31 03:58:31 +0200
committerZahary Karadjov <zahary@gmail.com>2013-12-31 04:04:59 +0200
commit8f3d5a25a692f1630bb24fbaf4951e68c9c99e28 (patch)
tree39750ca34ebdc95c26ad337c1b08599ee0550e91 /compiler/semexprs.nim
parent754e2ef1db61610cba1b96752fa37c6e923e2808 (diff)
downloadNim-8f3d5a25a692f1630bb24fbaf4951e68c9c99e28.tar.gz
Templates will pick the candidate in the nearest scope when symbols are mixed-in
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 14f611c5c..00c0e0f78 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -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