From 047d3af6daf73c378677f2cb3d5dbde80c35f790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20D=C3=B6ring?= Date: Sun, 22 Mar 2020 19:35:55 +0100 Subject: [PATCH] fix #13720 (#13721) --- compiler/types.nim | 2 +- tests/types/tillegaltuplerecursion.nim | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/types.nim b/compiler/types.nim index 4fcc3a2cf35fd..6b596b22ef7f6 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -1623,7 +1623,7 @@ proc isTupleRecursive(t: PType, cycleDetector: var IntSet): bool = if isTupleRecursive(t[i], cycleDetectorCopy): return true of tyAlias, tyRef, tyPtr, tyGenericInst, tyVar, tyLent, tySink, - tyArray, tyUncheckedArray, tySequence: + tyArray, tyUncheckedArray, tySequence, tyDistinct: return isTupleRecursive(t.lastSon, cycleDetector) else: return false diff --git a/tests/types/tillegaltuplerecursion.nim b/tests/types/tillegaltuplerecursion.nim index c822e88805d54..cb75ad9c37261 100644 --- a/tests/types/tillegaltuplerecursion.nim +++ b/tests/types/tillegaltuplerecursion.nim @@ -35,4 +35,6 @@ type children: ptr MyType9 MyType9 = tuple - children: MyType0 + children: MyType10 + + MyType10 = distinct seq[MyType0]