remove underscores
This commit is contained in:
parent
a65e9c0e25
commit
4619ee7058
1 changed files with 5 additions and 5 deletions
|
|
@ -633,19 +633,19 @@ proc procTypeRel(c: var TCandidate, f, a: PType): TTypeRelation =
|
||||||
else: discard
|
else: discard
|
||||||
|
|
||||||
proc typeRangeRel(f, a: PType): TTypeRelation {.noinline.} =
|
proc typeRangeRel(f, a: PType): TTypeRelation {.noinline.} =
|
||||||
template check_range[T](a_first, a_last, f_first, f_last: T): TTypeRelation =
|
template checkRange[T](afirst, alast, ffirst, flast: T): TTypeRelation =
|
||||||
if a_first == f_first and a_last == f_last:
|
if afirst == ffirst and alast == flast:
|
||||||
isEqual
|
isEqual
|
||||||
elif a_first >= f_first and a_last <= f_last:
|
elif afirst >= ffirst and alast <= flast:
|
||||||
isConvertible
|
isConvertible
|
||||||
elif a_first <= f_last and f_first <= a_last:
|
elif afirst <= flast and ffirst <= a_last:
|
||||||
# X..Y and C..D overlap iff (X <= D and C <= Y)
|
# X..Y and C..D overlap iff (X <= D and C <= Y)
|
||||||
isConvertible
|
isConvertible
|
||||||
else:
|
else:
|
||||||
isNone
|
isNone
|
||||||
|
|
||||||
if f.isOrdinalType:
|
if f.isOrdinalType:
|
||||||
check_range(firstOrd(a), lastOrd(a), firstOrd(f), lastOrd(f))
|
checkRange(firstOrd(a), lastOrd(a), firstOrd(f), lastOrd(f))
|
||||||
else:
|
else:
|
||||||
check_range(firstFloat(a), lastFloat(a), firstFloat(f), lastFloat(f))
|
check_range(firstFloat(a), lastFloat(a), firstFloat(f), lastFloat(f))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue