Cyclic records cannot be printed
Bug #174594 reported by
Joe Near
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Released
|
Low
|
Abdulaziz Ghuloum |
Bug Description
> (define-record-type t (fields (mutable x)))
> (define x (make-t 1))
> (t-x-set! x x)
> (printf "~s\n" x)
Causes an infinite loop, while the following works just fine:
> (define x (cons 'a 'b))
> (set-car! x x)
> (printf "~s\n" x)
#0=(#0# . b)
Do you plan to support something like this with records?
Changed in ikarus: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Weird. This works here:
Ikarus Scheme version 0.0.2patched+ (revision 1193, build 2007-12-07)
Copyright (c) 2006-2007 Abdulaziz Ghuloum
> (define-record-type t (fields (mutable x)))
> (define x (make-t 1))
> (t-x-set! x x)
> (printf "~s\n" x)
#0=#[t #0#]
> x
#0=#[t #0#]
> (display x)
#0=#[t #0#]