diff options
author | cooldome <ariabushenko@bk.ru> | 2018-06-12 23:23:21 +0100 |
---|---|---|
committer | cooldome <ariabushenko@bk.ru> | 2018-06-12 23:23:21 +0100 |
commit | 101f23f3a65fabd5cba2f03070be1e157e572d79 (patch) | |
tree | 7164b1427f2a3f3a8a33b42b52775830b9fb5768 | |
parent | 3dd61d6fff794d29ae48f682488819e1c320f346 (diff) | |
download | Nim-101f23f3a65fabd5cba2f03070be1e157e572d79.tar.gz |
manual merge 2
-rw-r--r-- | compiler/sigmatch.nim | 2 | ||||
-rw-r--r-- | compiler/types.nim | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index af0e9648f..915eca8c5 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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)) diff --git a/compiler/types.nim b/compiler/types.nim index 4c8c244db..23350a1e3 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -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]) |