Inspector shows wrong array element type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Jan Moringen |
Bug Description
The inspector claims all arrays have element type NIL. Example from today's git master:
---
$ sh ./run-sbcl.sh --no-userinit --no-sysinit
This is SBCL 1.5.4.27-8f3254078, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (inspect (make-array '() :element-type t))
The object is an ARRAY of NIL.
Its dimensions are NIL.
0. [] : 0
---
I expected it to say the object is an array of T.
The fix is trivial: the arguments to the format string in the INSPECTED-PARTS method for ARRAY are in the wrong order (and the format directive that's meant to distinguish displaced arrays is logically inverted). Patch attached. Here are some rudimentary tests.
---
(let ((string (with-output-
(assert (search "an ARRAY of T" string)))
(let ((string (with-output-
(assert (search "an ARRAY of FIXNUM" string)))
(let ((string (with-output-
(assert (search "a displaced ARRAY of T" string)))
---
Changed in sbcl: | |
status: | New → Confirmed |
assignee: | nobody → Jan Moringen (scymtym) |
importance: | Undecided → Low |
Changed in sbcl: | |
status: | Confirmed → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |