summary refs log tree commit diff stats
path: root/compiler/semfold.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-04-28 20:21:53 +0200
committerAraq <rumpf_a@web.de>2015-04-28 20:21:53 +0200
commit26eae7d00e73c65670775091bad8bfd796b3e1f1 (patch)
treee847a5ae8f3bb12d6212a7367e1ec89e5aa5ff65 /compiler/semfold.nim
parent3fa2e79814f3b093fc90e958cb805dbc1cf837be (diff)
downloadNim-26eae7d00e73c65670775091bad8bfd796b3e1f1.tar.gz
fixes #2470, fixes #1354
Diffstat (limited to 'compiler/semfold.nim')
-rw-r--r--compiler/semfold.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim
index 796dde9a6..941d47bb4 100644
--- a/compiler/semfold.nim
+++ b/compiler/semfold.nim
@@ -431,7 +431,8 @@ proc evalOp(m: TMagic, n, a, b, c: PNode): PNode =
      mExit, mInc, ast.mDec, mEcho, mSwap, mAppendStrCh,
      mAppendStrStr, mAppendSeqElem, mSetLengthStr, mSetLengthSeq,
      mParseExprToAst, mParseStmtToAst, mExpandToAst, mTypeTrait, mDotDot,
-     mNLen..mNError, mEqRef, mSlurp, mStaticExec, mNGenSym, mSpawn, mParallel:
+     mNLen..mNError, mEqRef, mSlurp, mStaticExec, mNGenSym, mSpawn,
+     mParallel, mPlugin:
     discard
   else: internalError(a.info, "evalOp(" & $m & ')')
 
@@ -544,7 +545,7 @@ proc foldConv*(n, a: PNode; check = false): PNode =
     discard
   else:
     result = a
-    result.typ = n.typ
+    result.typ = takeType(n.typ, a.typ)
 
 proc getArrayConstr(m: PSym, n: PNode): PNode =
   if n.kind == nkBracket: