* defer skiptypes * defer skiptypes for tyRef & tyPtr * remove unneeded skipTypes
This commit is contained in:
parent
a075a912cf
commit
25a41d5d90
3 changed files with 52 additions and 3 deletions
|
|
@ -158,7 +158,7 @@ proc commonType*(x, y: PType): PType =
|
|||
a = a.lastSon.skipTypes({tyGenericInst})
|
||||
b = b.lastSon.skipTypes({tyGenericInst})
|
||||
if a.kind == tyObject and b.kind == tyObject:
|
||||
result = commonSuperclass(a, b)
|
||||
result = commonSuperclass(a, b, k)
|
||||
# this will trigger an error later:
|
||||
if result.isNil or result == a: return x
|
||||
if result == b: return y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue