hotfix: firstOrd/lastOrd for 'tyLent' as it shows up in strange places, as usual
This commit is contained in:
parent
70acba7f0d
commit
80d3ef9952
1 changed files with 2 additions and 2 deletions
|
|
@ -729,7 +729,7 @@ proc firstOrd*(conf: ConfigRef; t: PType): Int128 =
|
||||||
assert(t.n[0].kind == nkSym)
|
assert(t.n[0].kind == nkSym)
|
||||||
result = toInt128(t.n[0].sym.position)
|
result = toInt128(t.n[0].sym.position)
|
||||||
of tyGenericInst, tyDistinct, tyTypeDesc, tyAlias, tySink,
|
of tyGenericInst, tyDistinct, tyTypeDesc, tyAlias, tySink,
|
||||||
tyStatic, tyInferred, tyUserTypeClasses:
|
tyStatic, tyInferred, tyUserTypeClasses, tyLent:
|
||||||
result = firstOrd(conf, lastSon(t))
|
result = firstOrd(conf, lastSon(t))
|
||||||
of tyOrdinal:
|
of tyOrdinal:
|
||||||
if t.len > 0: result = firstOrd(conf, lastSon(t))
|
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)
|
assert(t.n[^1].kind == nkSym)
|
||||||
result = toInt128(t.n[^1].sym.position)
|
result = toInt128(t.n[^1].sym.position)
|
||||||
of tyGenericInst, tyDistinct, tyTypeDesc, tyAlias, tySink,
|
of tyGenericInst, tyDistinct, tyTypeDesc, tyAlias, tySink,
|
||||||
tyStatic, tyInferred, tyUserTypeClasses:
|
tyStatic, tyInferred, tyUserTypeClasses, tyLent:
|
||||||
result = lastOrd(conf, lastSon(t))
|
result = lastOrd(conf, lastSon(t))
|
||||||
of tyProxy: result = Zero
|
of tyProxy: result = Zero
|
||||||
of tyOrdinal:
|
of tyOrdinal:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue