Printer for LET invokes sharing printing for NIL when *PRINT-CIRCLE* and *PRINT-PRETTY* are true

Bug #1855501 reported by Paul F. Dietz on 2019-12-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

(in-package :cl-user)

(with-standard-io-syntax (let ((*print-pretty* t) (*print-circle* t)) (print '(let () (let () x))) (values)))

>> (LET #1=()
   (LET #1#

This does not happen if LET is replaced by a random symbol:

(with-standard-io-syntax (let ((*print-pretty* t) (*print-circle* t)) (print '(f () (f () x))) (values)))

>> (F NIL (F NIL X))

It does happen with some other standardized symbols (LET*, DOTIMES, PROG, for example).

description: updated
Paul F. Dietz (paul-f-dietz) wrote :

Patch to fix the bug (ignore circularity detection on NIL).

Stas Boukarev (stassats) wrote :


Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats) on 2020-01-03
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers