summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-12-30 00:03:57 +0200
committerZahary Karadjov <zahary@gmail.com>2013-12-30 00:03:57 +0200
commitfa3bb8d66bfa18c3a497db2945df43703d809adc (patch)
tree40a5b2e3cc93362ea22654e47a52833b24691ebd /compiler/semexprs.nim
parent723efe7cfb6cb6ea4147cb5ba407ad3f39ac9032 (diff)
downloadNim-fa3bb8d66bfa18c3a497db2945df43703d809adc.tar.gz
restore return type inference
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 4e53a5389..14f611c5c 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.kind == tyGenericParam:
+      if lhs.sym.typ.isMetaType:
         if cmpTypes(c, lhs.typ, rhs.typ) == isGeneric:
           internalAssert c.p.resultSym != nil
           lhs.typ = rhs.typ