[armedbear-devel] Compiled type declaration and type checks (http://abcl.org/trac/ticket/323)

Theam Yong Chew senatorzergling at gmail.com
Fri Jan 17 14:50:54 UTC 2014


Just an FYI (is trac open to edits for the public? I guess not), I
managed to narrow down the problem here to this:

http://abcl.org/trac/ticket/323

(defun test (stream)
  (declare ;; (type stream stream)
   (stream stream)
   ;; (optimize speed (safety 1) (debug 0))
   )
  (write-byte 1 stream))

(flex:with-output-to-sequence (s)
  (test s))

If you evaluate test (C-x C-e), the second form works. If test is compiled,
(C-c C-c), then the second form fails. Some sort of type check error? The
flexi-streams *is* a stream:

(block a
  (flex:with-output-to-sequence (s)
    (return-from a
      (list (type-of s)
            (typep s 'stream)))))
=> (FLEXI-STREAMS::VECTOR-OUTPUT-STREAM T)



Yong



More information about the armedbear-devel mailing list