Fix make-array transforms.
[sbcl.git] / tests / bug-doug-mcnaught-20030914.lisp
1 (eval-when (:compile-toplevel :load-toplevel :execute)
2   (setq *readtable* (copy-readtable nil))  ; LOAD binds *readtable*...
3
4   (set-macro-character #\] (get-macro-character #\)))
5
6   (set-dispatch-macro-character #\# #\[
7                                 #'(lambda (s c n) (declare (ignore c))
8                                     (let* ((type (if n `(unsigned-byte ,n)
9                                                    '(unsigned-byte 8)))
10                                            (list (read-delimited-list #\] s nil))
11                                            (len (length list)))
12                                       (make-array (list len)
13                                                   :element-type type
14                                                   :initial-contents list)))))
15
16 (defvar *bug-doug-mcnaught-20030914* '#4[1 2 3])