From 80d3ef995282ec2e37968feedf7914ade6f2e62f Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 20 Jul 2020 17:44:35 +0200 Subject: [PATCH] hotfix: firstOrd/lastOrd for 'tyLent' as it shows up in strange places, as usual --- compiler/types.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/types.nim b/compiler/types.nim index 1f787a4e54..506e63478f 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -729,7 +729,7 @@ proc firstOrd*(conf: ConfigRef; t: PType): Int128 = assert(t.n[0].kind == nkSym) result = toInt128(t.n[0].sym.position) of tyGenericInst, tyDistinct, tyTypeDesc, tyAlias, tySink, - tyStatic, tyInferred, tyUserTypeClasses: + tyStatic, tyInferred, tyUserTypeClasses, tyLent: result = firstOrd(conf, lastSon(t)) of tyOrdinal: if t.len > 0: result = firstOrd(conf, lastSon(t)) @@ -786,7 +786,7 @@ proc lastOrd*(conf: ConfigRef; t: PType): Int128 = assert(t.n[^1].kind == nkSym) result = toInt128(t.n[^1].sym.position) of tyGenericInst, tyDistinct, tyTypeDesc, tyAlias, tySink, - tyStatic, tyInferred, tyUserTypeClasses: + tyStatic, tyInferred, tyUserTypeClasses, tyLent: result = lastOrd(conf, lastSon(t)) of tyProxy: result = Zero of tyOrdinal: