Ticket #439 (closed defect: fixed)
Gray Streams malfunction
| Reported by: | dbmcclain | Owned by: | gb |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Runtime (threads, GC) | Version: | |
| Keywords: | Gray Streams | Cc: |
Description
(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
