#同一のオブジェクトになるかどうかはともかく、(subtype? T (</> T T)) かつ (subtype? (</> T T) T)) になってほしさがあります。
#gosh> (subtype? <char> (</> <char> <char>))
#t
gosh> (subtype? (</> <char> <char>) <char>)
#f
gosh> (subtype? (</> <integer> <float>) <number>)
#f
#全部 #t を期待したのですが、何かおかしいですか?
#gosh> (subtype? <number> <float>)
#<undef>
gosh> (subtype? (</> <integer> <real>) <number>)
#f
#<float> がうっかりnative typeのやつだったのと別のバグがありそうなので、<real> で
#<float> のは
- [(SCM_NATIVE_TYPE_P super) (return FALSE)]
+ [(SCM_NATIVE_TYPE_P super) (return SCM_FALSE)]
かしら
#(subtype? (</> <number>) <number>) みたいなケース、(:subtype? (</> <number>) <number>) が呼ばれて 'super が返る -> (delegate-to-super (</> <number>) <number>) で (SCM_DESCRIPTIVE_TYPE_P <number>) が #f で (</> ...) の中身によらず #f になっちゃってます?
#gosh> (slot-set! </> 'subtype? (^[type super] (if (or (is-a? super </>) (is-a? super <class>)) (every (cut subtype? <> super) (~ type'members)) 'super)))
#<undef>
gosh> (subtype? <char> (</> <char> <char>))
#t
gosh> (subtype? (</> <char> <char>) <char>)
#t
gosh> (subtype? (</> <integer> <real>) <number>)
#t
gosh> (subtype? (</> <integer>) <number>)
#t