manual merge 2

This commit is contained in:
cooldome
2018-06-12 23:23:21 +01:00
parent 3dd61d6fff
commit 101f23f3a6
2 changed files with 3 additions and 3 deletions

View File

@@ -649,7 +649,7 @@ proc typeRangeRel(f, a: PType): TTypeRelation {.noinline.} =
isNone
if f.isOrdinalType:
checkRange(firstOrd(a), lastOrd(a), firstOrd(f), lastOrd(f))
checkRange(firstOrd(nil, a), lastOrd(nil, a), firstOrd(nil, f), lastOrd(nil, f))
else:
checkRange(firstFloat(a), lastFloat(a), firstFloat(f), lastFloat(f))

View File

@@ -643,7 +643,7 @@ proc firstFloat*(t: PType): BiggestFloat =
internalError(newPartialConfigRef(), "invalid kind for firstFloat(" & $t.kind & ')')
NaN
proc lastOrd*(t: PType; fixedUnsigned = false): BiggestInt =
proc lastOrd*(conf: ConfigRef; t: PType; fixedUnsigned = false): BiggestInt =
case t.kind
of tyBool: result = 1
of tyChar: result = 255
@@ -699,7 +699,7 @@ proc lastFloat*(t: PType): BiggestFloat =
NaN
proc lengthOrd*(t: PType): BiggestInt =
proc lengthOrd*(conf: ConfigRef; t: PType): BiggestInt =
case t.kind
of tyInt64, tyInt32, tyInt: result = lastOrd(conf, t)
of tyDistinct: result = lengthOrd(conf, t.sons[0])