The value NIL is not of type SB-C::PHYSENV

Bug #1741516 reported by Paul F. Dietz on 2018-01-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

(defun f (stream)
  (labels ((f1 (value)
             (cond ((typep value 'integer) (f2 value))
                   ((typep value 'float) (f3 value))
                   (t (format stream " ~a" value))
                   ))
           (f2 (d)
             (unless (f4 d) (f1 (f6 d)))
             (f1 (f5 d))
             ))))
===>

The value
  NIL
is not of type
  SB-C::PHYSENV
from the function type declaration.
   [Condition of type TYPE-ERROR]
[...]
  0: (SB-C::BLOCK-PHYSENV #<SB-C::CBLOCK 6 :START c1 {10065080B3}>)
  1: (SB-C::FIND-CLEANUP-POINTS #<SB-C:COMPONENT :NAME (LABELS F1 :IN F) :REANALYZE T {1006502533}>)
  2: (SB-C::PHYSENV-ANALYZE #<SB-C:COMPONENT :NAME (LABELS F1 :IN F) :REANALYZE T {1006502533}>)
 [...]

Paul F. Dietz (paul-f-dietz) wrote :

Another lambda that errors the same way:

(lambda (log)
  (let (x)
    (loop for str in x
       for i from 0
       do (handler-case
              (progn
                (g2 str)
                (format log ""))
            (error () nil)))))

Stas Boukarev (stassats) wrote :

1816c4eb24b170a7614bbeb391f75dd2ef47ff32

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats) on 2018-01-31
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers