Bogus runtime type error related to inlined function
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
1. A description of what you do, what happens, and what you expected to happen.
Define a function with a declaimed type and call it. Expected the call to return without error, got a type error instead.
2. A complete repeatable test-case
Save the following code in /tmp/bug.lisp:
(declaim (ftype (function ((unsigned-byte 62) t) (values t &optional))
(defun test2 (position chunk)
(let ((cell (aref chunk position)))
(when (consp (cdr cell))
(
(let ((chunk (make-array 1)))
(setf (aref chunk 0) '(0 . ((foo . :bar) (baz . :fez))))
(test2 0 chunk))
Execute SBCL via sbcl --no-userinit <anything needed to make alexandria loadable> --eval '(asdf:load-system :alexandria)' --load /tmp/bug.lisp
Observe
debugger invoked on a TYPE-ERROR @535921B8 in thread
#<THREAD "main thread" RUNNING {1001C80303}>:
The value
((FOO . :BAR) (BAZ . :FEZ))
is not of type
LIST
3. SBCL version
SBCL built from 0b2a27ffa with --fancy. (Same behavior with 93167bb4f)
4. Output from uname -a
Linux al 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux
5. *FEATURES*
(:X86-64 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-
:LITTLE-ENDIAN :PACKAGE-
:SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Regardless of the error, the type declaration is actually incorrect, alexandria: assoc-value returns two values.