Derived function type used as an assertion

Bug #1393302 reported by Stas Boukarev
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Medium
Unassigned

Bug Description

(defun redefine ()
  "123")

(defun foo ()
  (unwind-protect (redefine) 1))

compiled in one go in a single file,
then
(progn (defun redefine () "12") (foo))
=>
The value "12" is not of type (SIMPLE-ARRAY CHARACTER (3)).

Revision history for this message
Stas Boukarev (stassats) wrote :

(defun foo ()
  (let ((x (redefine)))
    x))

is enough.

Revision history for this message
Stas Boukarev (stassats) wrote :

Of course it's undefined what happens to redefined functions from the same file, but this makes interactive development impossible, especially when the type is specific enough. And there seems to be no way to turn it off, and it does not always happen.

Revision history for this message
Charles (karlosz) wrote :

One can now set *derive-function-types* to NIL from its default of :SAME-FILE.

Changed in sbcl:
status: Triaged → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.