The value NIL is not of type SB-KERNEL:CTYPE

Bug #1928243 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(lambda (b)
   (declare (type (integer -859072 606168) b))
   (block b1
     (oddp
      (/
       (ignore-errors
        (if t
            (return-from b1 -61796)
            b))
       1))))

==>

The value
  NIL
is not of type
  SB-KERNEL:CTYPE
when binding TYPE
   [Condition of type TYPE-ERROR]
[...]
  0: (SB-KERNEL:CTYPEP 0 NIL) [external]
  1: ((SB-C:DEFTRANSFORM LOGTEST) #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME LOGTEST :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND :GLOBAL..
  2: (SB-C::IR1-OPTIMIZE-COMBINATION #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME LOGTEST :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND :GLO..
  3: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME (FLET "FORM-FUN-4" :IN B1) :REANALYZE T {101A8B7063}> NIL)
  4: (SB-C::IR1-OPTIMIZE-UNTIL-DONE #<SB-C:COMPONENT :NAME (FLET "FORM-FUN-4" :IN B1) :REANALYZE T {101A8B7063}>)
  5: (SB-C::IR1-OPTIMIZE-PHASE-1 #<SB-C:COMPONENT :NAME (FLET "FORM-FUN-4" :IN B1) :REANALYZE T {101A8B7063}>)
  6: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME (FLET "FORM-FUN-4" :IN B1) :REANALYZE T {101A8B7063}>)
[...]

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Another example:

(lambda (c) (block nil (evenp (the integer (ignore-errors (if nil 0 (return c)))))))

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Not seeing the fix?

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Oops, wrong bug.

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.

Other bug subscribers

Remote bug watches

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