summary refs log tree commit diff stats
path: root/compiler/semdata.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-01-05 02:27:36 +0100
committerAraq <rumpf_a@web.de>2015-01-05 02:27:36 +0100
commit4316fdddf3a968c5b118c09f9e6bb7c9f8210a96 (patch)
tree192da543f81415b0c739f24099560d1a49192805 /compiler/semdata.nim
parent7524610b310203c423f0fd593a05baca603e3a6c (diff)
parent5ee4806aa322a0943efdd0fb89b5c2d1b1c1ce40 (diff)
downloadNim-4316fdddf3a968c5b118c09f9e6bb7c9f8210a96.tar.gz
Merge branch 'devel' of https://github.com/Araq/Nim into devel
Diffstat (limited to 'compiler/semdata.nim')
-rw-r--r--compiler/semdata.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim
index f876770c0..623f9b633 100644
--- a/compiler/semdata.nim
+++ b/compiler/semdata.nim
@@ -268,7 +268,7 @@ proc makeRangeWithStaticExpr*(c: PContext, n: PNode): PType =
 
 template rangeHasStaticIf*(t: PType): bool =
   # this accepts the ranges's node
-  t.n[1].kind == nkStaticExpr
+  t.n != nil and t.n.len > 1 and t.n[1].kind == nkStaticExpr
 
 template getStaticTypeFromRange*(t: PType): PType =
   t.n[1][0][1].typ