summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorGöran Krampe <goran@3dicc.com>2015-05-20 12:48:38 +0200
committerGöran Krampe <goran@3dicc.com>2015-05-20 12:48:38 +0200
commit0fc53151ba00ff31c55798674e21f7e5780320f0 (patch)
tree2780acdbc3a036431292f475fddc22ead495a8d4 /lib
parent2cceaff88abdc2b25d93f34393bfcf4dc6b5ca3f (diff)
downloadNim-0fc53151ba00ff31c55798674e21f7e5780320f0.tar.gz
Tweaked to do commas properly
Diffstat (limited to 'lib')
-rw-r--r--lib/system/repr.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system/repr.nim b/lib/system/repr.nim
index dbb14bd2c..be346121a 100644
--- a/lib/system/repr.nim
+++ b/lib/system/repr.nim
@@ -194,15 +194,15 @@ when not defined(useNimRtl):
                   cl: var TReprClosure) =
     add result, "["
     var curTyp = typ
-    var lastPart = ""
+    var first = true
     while curTyp.base != nil:
       var part = ""
       reprRecordAux(part, p, curTyp.node, cl)
       if part.len > 0:
-        if lastPart.len > 0:
+        if not first:
           add result, ",\n"
         add result, part
-      lastPart = part
+        first = false
       curTyp = curTyp.base
     add result, "]"