summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorcooldome <ariabushenko@bk.ru>2018-06-12 09:27:37 +0100
committercooldome <ariabushenko@bk.ru>2018-06-12 09:27:37 +0100
commit77f33db3ed5b3f3c116dcb8159e68a8d51daede8 (patch)
tree00117afa22933f72c5f5519150aef36d2840259f
parent4619ee70580b6dfb12dc3f8063173d5e0c07b9be (diff)
downloadNim-77f33db3ed5b3f3c116dcb8159e68a8d51daede8.tar.gz
style fixes, typos
-rw-r--r--compiler/sigmatch.nim10
-rw-r--r--doc/manual.rst2
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 3e278b3dc..8db14f1cf 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -633,12 +633,12 @@ proc procTypeRel(c: var TCandidate, f, a: PType): TTypeRelation =
   else: discard
 
 proc typeRangeRel(f, a: PType): TTypeRelation {.noinline.} =
-  template checkRange[T](afirst, alast, ffirst, flast: T): TTypeRelation = 
-    if afirst == ffirst and alast == flast:
+  template checkRange[T](a0, a1, f0, f1: T): TTypeRelation = 
+    if a0 == f0 and a1 == f1:
       isEqual
-    elif afirst >= ffirst and alast <= flast:
+    elif a0 >= f0 and a1 <= f1:
       isConvertible
-    elif afirst <= flast and ffirst <= a_last:
+    elif a0 <= f1 and f0 <= a1:
       # X..Y and C..D overlap iff (X <= D and C <= Y)
       isConvertible
     else:
@@ -647,7 +647,7 @@ proc typeRangeRel(f, a: PType): TTypeRelation {.noinline.} =
   if f.isOrdinalType: 
     checkRange(firstOrd(a), lastOrd(a), firstOrd(f), lastOrd(f))
   else: 
-    check_range(firstFloat(a), lastFloat(a), firstFloat(f), lastFloat(f))
+    checkRange(firstFloat(a), lastFloat(a), firstFloat(f), lastFloat(f))
     
 
 proc matchUserTypeClass*(m: var TCandidate; ff, a: PType): PType =
diff --git a/doc/manual.rst b/doc/manual.rst
index 0ebd782bf..9f55654a1 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -741,7 +741,7 @@ For further details, see `Convertible relation
 
 Subrange types
 --------------
-A subrange type is a range of values from an ordinal or float point type (the base
+A subrange type is a range of values from an ordinal or floating point type (the base
 type). To define a subrange type, one must specify it's limiting values: the
 lowest and highest value of the type: