From 249a352c6b5d10bbc45ebb3a2f56964782d1db17 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 19 Jan 2017 07:11:09 +0100 Subject: fixes #3434 --- compiler/semfold.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/semfold.nim b/compiler/semfold.nim index 39d84c0fa..e3469c602 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -220,7 +220,7 @@ proc getIntervalType*(m: TMagic, n: PNode): PType = of mModU: let a = n.sons[1] let b = n.sons[2] - if a.kind in ordIntLit: + if b.kind in ordIntLit: if b.intVal >= 0: result = makeRange(a.typ, 0, b.intVal-1) else: -- cgit 1.4.1-2-gfad0