Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
krux02 committed Mar 21, 2020
1 parent 586ebb0 commit 1888626
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,10 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
of tyUncheckedArray:
result = "UncheckedArray[" & typeToString(t[0]) & ']'
of tySequence:
result = "seq[" & typeToString(t[0]) & ']'
if t.sym != nil and prefer != preferResolved:
result = t.sym.name.s
else:
result = "seq[" & typeToString(t[0]) & ']'
of tyOpt:
result = "opt[" & typeToString(t[0]) & ']'
of tyOrdinal:
Expand Down
6 changes: 6 additions & 0 deletions tests/types/tillegalseqrecursion.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
discard """
errormsg: "illegal recursion in type 'CyclicSeq'"
"""
# issue #13715
type
CyclicSeq = seq[ref CyclicSeq]

0 comments on commit 1888626

Please sign in to comment.