summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-01-19 07:11:09 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-01-19 07:11:17 +0100
commit249a352c6b5d10bbc45ebb3a2f56964782d1db17 (patch)
treefe55b19852bc43881acdb7503f1e8f657590202f
parenta296f091e456b706dab52916da4ad73f308a2345 (diff)
downloadNim-249a352c6b5d10bbc45ebb3a2f56964782d1db17.tar.gz
fixes #3434
-rw-r--r--compiler/semfold.nim2
1 files changed, 1 insertions, 1 deletions
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: