summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-05-01 09:31:29 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-05-01 09:31:29 +0200
commit962d03d6717a5b03de52cc18aeb8ad9458a6eb8f (patch)
treefa768f56c71b5179cdd0c1c53b66f092a79e7b1d /compiler
parent56a5c249c95950e7c064f4d2b660de6fc1fb5674 (diff)
downloadNim-962d03d6717a5b03de52cc18aeb8ad9458a6eb8f.tar.gz
isDeepConstExpr helper can handle nkRange
Diffstat (limited to 'compiler')
-rw-r--r--compiler/trees.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/trees.nim b/compiler/trees.nim
index 424fba14c..8f0af89d3 100644
--- a/compiler/trees.nim
+++ b/compiler/trees.nim
@@ -96,7 +96,7 @@ proc isDeepConstExpr*(n: PNode): bool =
     result = true
   of nkExprEqExpr, nkExprColonExpr, nkHiddenStdConv, nkHiddenSubConv:
     result = isDeepConstExpr(n.sons[1])
-  of nkCurly, nkBracket, nkPar, nkObjConstr, nkClosure:
+  of nkCurly, nkBracket, nkPar, nkObjConstr, nkClosure, nkRange:
     for i in ord(n.kind == nkObjConstr) .. <n.len:
       if not isDeepConstExpr(n.sons[i]): return false
     if n.typ.isNil: result = true