id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
439,Gray Streams malfunction,dbmcclain,gb,"(defclass ubyte-stream ()
  ())

(defmethod cl:stream-element-type ((stream ubyte-stream))
  '(unsigned-byte 8))

;; --------------------------------------------------------------------------------

(defclass ubyte-output-stream (ccl:fundamental-binary-output-stream ubyte-stream)
  ((arr  :accessor uos-arr :initform (make-array 0
                                                 :element-type '(unsigned-byte 8)
                                                 :adjustable t
                                                 :fill-pointer t))))

(defun make-ubyte-output-stream ()
  (make-instance 'ubyte-output-stream))

--------------------------------------------
Now try:

(defparameter s (make-ubyte-output-stream))

(write-byte 15 s) -->> boom!

value #<UBYTE-OUTPUT-STREAM #x9224AEE> is not of the expected type (AND
                                                                    OUTPUT-STREAM
                                                                    CCL::BINARY-STREAM).
   [Condition of type TYPE-ERROR]


Yet, if I do the following:

(typep s '(and output-stream ccl::binary-stream)) ==> t


",defect,closed,normal,,"Runtime (threads, GC)",,fixed,Gray Streams,
