Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#915 closed defect (fixed)

bad printing of dotted pairs with *print-circle* = t

Reported by: matt.kaufmann Owned by: gb
Priority: normal Milestone:
Component: other Version: trunk
Keywords: *print-circle* Cc:

Description

An extra "." can be printed when *print-circle* is t. A log is below. The version (15230) is the trunk as of two days ago. Not sure how to specify the "component" -- I'd guess it's a source code bug, but I don't know.

Welcome to Clozure Common Lisp Version 1.8-dev-r15230M-trunk  (LinuxX8664)!
? (let* ((*print-circle* t)
	 (atm "hi")
	 (alist `((3 . ,atm) (2 . ,atm))))
    (print alist))

((3 . #1= . "hi") (2 . #1#)) 
((3 . "hi") (2 . "hi"))
? '((3 . #1= . "hi") (2 . #1#))  ; the extra dot ruins readability, of course:

> Error: Reader error on #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x3020006EDE3D>, near position 13:
>        Dot context error in ".".
> While executing: CCL::SIGNAL-READER-ERROR, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :q
? '((3 . #1="hi") (2 . #1#)) ; manual correction
((3 . "hi") (2 . "hi"))
?

Change History (3)

comment:1 Changed 7 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned

comment:2 Changed 7 years ago by gb

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [15252]) WRITE-NOT-PRETTY: handle circularity/dotted lists correctly. Fixes ticket:915.

comment:3 Changed 7 years ago by rme

(In [15275]) Merge r15252 from trunk. (See ticket:915)

Note: See TracTickets for help on using tickets.