more robust for nim check
This commit is contained in:
parent
1ce17c7aaa
commit
02c076f9b4
1 changed files with 1 additions and 0 deletions
|
|
@ -969,6 +969,7 @@ proc inheritanceDiff*(a, b: PType): int =
|
|||
# | returns: -x iff `a` is the x'th direct superclass of `b`
|
||||
# | returns: +x iff `a` is the x'th direct subclass of `b`
|
||||
# | returns: `maxint` iff `a` and `b` are not compatible at all
|
||||
if a == b or a.kind == tyError or b.kind == tyError: return 0
|
||||
assert a.kind == tyObject
|
||||
assert b.kind == tyObject
|
||||
var x = a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue