From 9df232911c99830d7adc4970db23495e3affa379 Mon Sep 17 00:00:00 2001 From: Mark Flamer Date: Fri, 25 Oct 2013 19:04:10 -0700 Subject: [PATCH] fix for Issue #629 Recursive generic types not working --- compiler/types.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/types.nim b/compiler/types.nim index 66748c3081..eeb68aefac 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -825,6 +825,8 @@ proc SameTypeAux(x, y: PType, c: var TSameTypeClosure): bool = of dcEqOrDistinctOf: while a.kind == tyDistinct: a = a.sons[0] if a.kind != b.kind: return false + if x.Kind == tyGenericInst or y.Kind == tyGenericInst: + c.cmp = dcEqIgnoreDistinct case a.Kind of tyEmpty, tyChar, tyBool, tyNil, tyPointer, tyString, tyCString, tyInt..tyBigNum, tyStmt: