diff options
Diffstat (limited to 'compiler/sem.nim')
-rw-r--r-- | compiler/sem.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim index b34972219..e7bff0665 100644 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -118,8 +118,8 @@ proc commonType*(x, y: PType): PType = if a.kind in {tyRef, tyPtr}: k = a.kind if b.kind != a.kind: return x - a = a.sons[0] - b = b.sons[0] + a = a.lastSon + b = b.lastSon if a.kind == tyObject and b.kind == tyObject: result = commonSuperclass(a, b) # this will trigger an error later: |