[racket] strange behaviour of class inspector

From: seryojka (iamfakemail at yandex.ru)
Date: Wed Aug 20 14:16:07 EDT 2014

Hello, I can't understand why does my program produce an error. The code 
should be readable enough to get the crux of the issue.

#lang racket/base

(require racket/class)


(define some<%>
   (interface ()
     ;; method ; ok
     [method (->m any)] ; fails for contracted method
     ))

(define some-mixin
   (mixin () (some<%>)
     (super-new)
     (inspect #f)

     (define/public (method) 'value)))

(define cls%
   (class (some-mixin object%)
     (super-new)
     (inspect #f)

     (define/public (info) (class-info this%))))

(send (new cls%) info)



=>

class-info: current inspector cannot inspect class
   class: #<class:cls%>
   context...:





Posted on the users mailing list.