Incorrect type error w. EQL number type

Bug #1838892 reported by Paul F. Dietz on 2019-08-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

(defun f382 (p1 q)
  (declare (type (eql 0) p1))
  (phase
   (the (rational -1 0)
        (flet ((%f (x) (the number x)))
          (if q
              (%f p1)
              'foo)))))

(warning issued about the else branch of the if)

(f382 0 t) ==>

The value
  FOO
is not of type
  (RATIONAL -1 0)
   [Condition of type TYPE-ERROR]

Restarts:
 0: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (F382 #<unused argument> T)
  1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (F382 0 T) #<NULL-LEXENV>)
  2: (EVAL (F382 0 T))

Stas Boukarev (stassats) wrote :

c9ad45ddc8194bf94822322624a0d77d6a29b9bf

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

Other bug subscribers