Skip to content

Commit

Permalink
fix #13720 (#13721)
Browse files Browse the repository at this point in the history
  • Loading branch information
krux02 authored Mar 22, 2020
1 parent 86b9435 commit 047d3af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/types/tillegaltuplerecursion.nim
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ type
children: ptr MyType9

MyType9 = tuple
children: MyType0
children: MyType10

MyType10 = distinct seq[MyType0]

0 comments on commit 047d3af

Please sign in to comment.