diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-11-19 12:12:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 12:12:51 -0800 |
commit | b3c3557c338c6cb0992abf9d2d877e927d815ea3 (patch) | |
tree | 4d4f0754eaa2c0b84db7c4d8bcc21e60bfb4a845 /lib/system | |
parent | 1efd11e2666403fecf1b9b3b933c1adca13d8069 (diff) | |
download | Nim-b3c3557c338c6cb0992abf9d2d877e927d815ea3.tar.gz |
fix #16025 repr now consistent: does not insert trailing newline (#16034)
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/repr.nim | 3 | ||||
-rw-r--r-- | lib/system/reprjs.nim | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/system/repr.nim b/lib/system/repr.nim index 318e95ebb..ae51a4aab 100644 --- a/lib/system/repr.nim +++ b/lib/system/repr.nim @@ -325,5 +325,6 @@ when not defined(useNimRtl): else: var p = p reprAux(result, addr(p), typ, cl) - add result, "\n" + when defined(nimLegacyReprWithNewline): # see PR #16034 + add result, "\n" deinitReprClosure(cl) diff --git a/lib/system/reprjs.nim b/lib/system/reprjs.nim index 9c27a4721..36972024a 100644 --- a/lib/system/reprjs.nim +++ b/lib/system/reprjs.nim @@ -237,4 +237,5 @@ proc reprAny(p: pointer, typ: PNimType): string {.compilerRtl.} = var cl: ReprClosure initReprClosure(cl) reprAux(result, p, typ, cl) - add(result, "\n") + when defined(nimLegacyReprWithNewline): # see PR #16034 + add result, "\n" |