better better fix for Issue #629 Recursive generic types not working

This commit is contained in:
Mark Flamer 2013-10-30 16:08:54 -07:00
commit f8206cb357

View file

@ -838,10 +838,9 @@ proc SameTypeAux(x, y: PType, c: var TSameTypeClosure): bool =
of tyDistinct:
CycleCheck()
if c.cmp == dcEq:
result = false
if a.sym != nil and b.sym != nil:
if a.sym.name == b.sym.name:
result = sameTypeAux(a.sons[0], b.sons[0], c) and sameFlags(a, b)
if sameFlags(a, b):
IfFastObjectTypeCheckFailed(a, b):
result = sameTypeAux(a.sons[0], b.sons[0], c)
else:
result = sameTypeAux(a.sons[0], b.sons[0], c) and sameFlags(a, b)
of tyEnum, tyForward, tyProxy: