diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-11-17 16:23:54 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-11-17 16:23:54 +0100 |
commit | e61d8166cc12c85816853feb1492a10944cfe0aa (patch) | |
tree | a06e9507088bc1f55a401b49d15e32d60fbf8770 | |
parent | 2d726711fac6e594b728e5b6252823ffc70ba2eb (diff) | |
download | Nim-e61d8166cc12c85816853feb1492a10944cfe0aa.tar.gz |
fixes the second example of #6757
-rw-r--r-- | compiler/semfold.nim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim index 089e66abd..1e7c0aa9e 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -606,13 +606,13 @@ proc getConstExpr(m: PSym, n: PNode): PNode = if a == nil: return nil result.sons[i] = a incl(result.flags, nfAllConst) - of nkObjConstr: - result = copyTree(n) - for i in countup(1, sonsLen(n) - 1): - var a = getConstExpr(m, n.sons[i].sons[1]) - if a == nil: return nil - result.sons[i].sons[1] = a - incl(result.flags, nfAllConst) + #of nkObjConstr: + # result = copyTree(n) + # for i in countup(1, sonsLen(n) - 1): + # var a = getConstExpr(m, n.sons[i].sons[1]) + # if a == nil: return nil + # result.sons[i].sons[1] = a + # incl(result.flags, nfAllConst) of nkPar: # tuple constructor result = copyTree(n) |