Two-way-streams and gray streams
ABCL runs into troubles with the following example:
shell> cat test.lisp
(in-package cl-user)
(require 'gray-streams)
(defclass out (gray-streams:fundamental-character-output-stream)
((buffer :initform (make-array 200 :element-type 'character
:adjustable t :fill-pointer 0)
:reader out-buffer)))
(defmethod gray-streams:stream-write-char ((s out) (c character))
(vector-push-extend c (out-buffer s)))
(let ((out (make-instance 'out)))
(write-string "foo" (make-two-way-stream *standard-input* out))
(assert (equal "foo" (out-buffer out))))
shell> abcl
Armed Bear Common Lisp 1.4.0-dev-svn-14730
Java 1.7.0_03 Oracle Corporation
OpenJDK Client VM
Low-level initialization completed in 0.841 seconds.
Startup completed in 4.419 seconds.
Loading /home/helmut/.abclrc completed in 0.108 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (load "test.lisp")
Error loading /raid/home/helmut/lisp/test.lisp at line 16 (offset 488)
#<THREAD "interpreter" {8A408D}>: Debugger invoked on condition of type TYPE-ERROR
The value #<OUT {940A15}> is not of type STREAM.
Restarts:
0: TOP-LEVEL Return to top level.
[1] CL-USER(2):
The expected outcome is that assertion the succeeds.
Change History (14)
Milestone: |
→ 1.4.0
|
Version: |
→ 1.4.0-dev
|
Ticket retargeted after milestone closed