Ticket #1061 (closed defect: fixed)
Multidimensional array reader syntax
| Reported by: | bayerf | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | ANSI CL Compliance | Version: | trunk |
| Keywords: | Cc: | fred@… |
Description
The reader signals an error when the first sequence in the initial contents list isn't a list, but a vector, bitvector or string when parsing a 2-dimensional array literal:
? #2a("ab" #*01)
Error: Reader error on #<CCL::RECORDING-CHARACTER-INPUT-STREAM #x2100CE960D>,
near position 14:
Initial contents for #A is inconsistent with dimensions: #2A("ab" #<SIMPLE-BIT-VECTOR 2>) While executing: CCL::SIGNAL-READER-ERROR, in process listener(1).
If the first sequence is a list, everything works fine:
? #2a((1 2) "ab" #*10) #2A((1 2) (#\a #\b) (1 0))
Creating the array with make-array also works fine:
? (make-array '(2 2) :initial-contents '("ab" #*10)) #2A((#\a #\b) (1 0))
