[plt-scheme] Bug in interaction between shared and class system?

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Tue Dec 29 08:47:28 EST 2009

#lang scheme

(define Node%
  (class object%
    (init-field value


(define cycle
  (shared ([the-node (new Node% [value "abc"] [next the-node])])
If I'm using shared correctly, that should create a Node% that refers
back to itself.

cycle really is a Node%:

> cycle
#(struct:object:Node% ...)

but its next didn't get set correctly.

> (get-field next cycle)

Is this a bug, or am I not allowed to do this?

Posted on the users mailing list.