[racket] Is this a bug in contracts?

From: Harry Spier (vasishtha.spier at gmail.com)
Date: Wed Jan 16 21:20:48 EST 2013

On Wed, Jan 16, 2013 at 8:49 PM, Matthias Felleisen
 <matthias at ccs.neu.edu> wrote:

 > First, you mistakenly have the class inherit from itself. You want
object% in the super-class position in both cases.
 >
Sorry I meant object% as superclass'

 > Second, you don't get to formulate contracts like that. We have
flat-rec-contracts but a class contract is a higher-order contract
because a class is like a function.
 >
I'm not clear Is this contract still wrong?

 #lang racket
 (define/contract pizza-D%
   (class/c [init-field (p (is-a?/c pizza-D%))])
   (class object% (super-new)
   (init-field p)))

Posted on the users mailing list.