summary refs log tree commit diff stats
path: root/compiler/semfold.nim
diff options
context:
space:
mode:
authorJasper Jenkins <jasper.vs.jenkins@gmail.com>2019-05-05 01:15:31 -0700
committerJasper Jenkins <jasper.vs.jenkins@gmail.com>2019-05-05 01:15:31 -0700
commitec099fc13ff188cb696af6f3524c75a8648d0391 (patch)
tree04753573b30a0d2145a778e2b4d558826a40db2b /compiler/semfold.nim
parent0add3a6dc0f9f3f5f38f190bda71938fef05ca7a (diff)
downloadNim-ec099fc13ff188cb696af6f3524c75a8648d0391.tar.gz
handle separately in backends
Diffstat (limited to 'compiler/semfold.nim')
-rw-r--r--compiler/semfold.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim
index 3034ef9cc..5fb2fcd65 100644
--- a/compiler/semfold.nim
+++ b/compiler/semfold.nim
@@ -701,7 +701,7 @@ proc getConstExpr(m: PSym, n: PNode; g: ModuleGraph): PNode =
       for i in countup(0, sonsLen(n) - 1):
         var a = getConstExpr(m, n.sons[i].sons[1], g)
         if a == nil: return nil
-        result.sons[i] = a
+        result.sons[i].sons[1] = a
     else:
       for i in countup(0, sonsLen(n) - 1):
         var a = getConstExpr(m, n.sons[i], g)