named-lambda clobbers type derivation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
(defun foo ()
99)
(when nil
(defun foo ()
:bar))
(defun foo2 ()
(let ((x (foo)))
x))
When the above is compiled,
(foo2) ;=> error: The value 99 is not of type (MEMBER :BAR).
FOO derived type: (FUNCTION NIL (VALUES (INTEGER 99 99) &OPTIONAL))
FOO2 derived type: (FUNCTION NIL (VALUES (MEMBER :BAR) &OPTIONAL))
Confirmed on latest 1.1.16.32-eca778f and various versions I tried
back to 1.0.50.
Linux xii 3.2.0-24-
2012 i686 i686 i386 GNU/Linux
(:ALIEN-CALLBACKS :ANSI-CL :C-STACK-
:COMPARE-
:IEEE-FLOATING-
:LINUX :LITTLE-ENDIAN :MEMORY-
:OS-PROVIDES-
:OS-PROVIDES-
:OS-PROVIDES-
:SB-CORE-
:SB-PACKAGE-LOCKS :SB-SOURCE-
:SB-XREF-
:STACK-
:STACK-
:UNWIND-
description: | updated |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
The consequences are actually undefined if you modify the function which is called by another function in the same file, but that typecheck is bogus.