summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-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: