diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semtypes.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index e24597956..d0c8c8520 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -1348,8 +1348,8 @@ proc semGeneric(c: PContext, n: PNode, s: PSym, prev: PType): PType = # special check for generic object with # generic/partial specialized parent let tx = result.skipTypes(abstractPtrs, 50) - if tx.isNil: - localError(c.config, n.info, "invalid recursion in type '$1'" % typeToString(result[0])) + if tx.isNil or isTupleRecursive(tx): + localError(c.config, n.info, "illegal recursion in type '$1'" % typeToString(result[0])) return errorType(c) if tx != result and tx.kind == tyObject and tx.sons[0] != nil: semObjectTypeForInheritedGenericInst(c, n, tx) |