* fixes #7600 * fix wrong logic
This commit is contained in:
parent
397e173139
commit
e4aa140d22
3 changed files with 42 additions and 2 deletions
|
|
@ -1388,8 +1388,13 @@ proc typeRelImpl(c: var TCandidate, f, aOrig: PType,
|
|||
|
||||
var aAsObject = roota.lastSon
|
||||
|
||||
if fKind in {tyRef, tyPtr} and aAsObject.kind == fKind:
|
||||
aAsObject = aAsObject.base
|
||||
if fKind in {tyRef, tyPtr}:
|
||||
if aAsObject.kind == tyObject:
|
||||
# bug #7600, tyObject cannot be passed
|
||||
# as argument to tyRef/tyPtr
|
||||
return isNone
|
||||
elif aAsObject.kind == fKind:
|
||||
aAsObject = aAsObject.base
|
||||
|
||||
if aAsObject.kind == tyObject:
|
||||
let baseType = aAsObject.base
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue