fix mcons handling by built-in printer in expression mode

This commit is contained in:
Matthew Flatt 2016-06-11 06:53:31 -06:00
parent b6e252c1e3
commit c71f33f9f8
2 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@
(ptest "'#hasheqv((1 . 2))" (make-hasheqv (list (cons 1 2))))
(ptest "(mcons 1 2)" (mcons 1 2))
(ptest "(mcons 1 '())" (mcons 1 null))
(ptest "#<a>" (a 1 2))
(ptest "(b 1 2)" (b 1 2))

View File

@ -3946,7 +3946,7 @@ print_pair(Scheme_Object *pair, int notdisplay, int compact,
cdr = SCHEME_CDR(cdr);
}
if (!SCHEME_NULLP(cdr)) {
if (!SCHEME_NULLP(cdr) || (pair_type == -1)) {
if (!compact) {
if (notdisplay == 3)
print_utf8_string(pp, " ", 0, 1);