changes $ for seqs to never produce 'nil'

This commit is contained in:
Andreas Rumpf
2018-08-18 16:59:37 +02:00
parent 887987bb1a
commit b2d5bfd076

View File

@@ -2530,10 +2530,7 @@ proc `$`*[T](x: seq[T]): string =
##
## .. code-block:: nim
## $(@[23, 45]) == "@[23, 45]"
if x.isNil:
"nil"
else:
collectionToString(x, "@[", ", ", "]")
collectionToString(x, "@[", ", ", "]")
# ----------------- GC interface ---------------------------------------------