diff options
author | Mark Flamer <mflamer@vectorworks.net> | 2013-10-25 19:04:10 -0700 |
---|---|---|
committer | Mark Flamer <mflamer@vectorworks.net> | 2013-10-25 19:04:14 -0700 |
commit | 9df232911c99830d7adc4970db23495e3affa379 (patch) | |
tree | 34b8669d317f6829577704a3c16e7aa00b3e1713 /compiler | |
parent | 7832f25abf25cbdffa483845ebfd6f774fcb8e84 (diff) | |
download | Nim-9df232911c99830d7adc4970db23495e3affa379.tar.gz |
fix for Issue #629 Recursive generic types not working
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/types.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/types.nim b/compiler/types.nim index 66748c308..eeb68aefa 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: |