Failed AVER in a program with incompatible type declaration

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

Bug Description

(defun f58 (x f)
  (declare (type function f))
  (typep x f) ;; f is a bad argument to TYPEP
  (funcall f))

===>

failed AVER:
    (EQ (SB-C::TN-PRIMITIVE-TYPE SB-C::LOC)
        SB-C::FUNCTION-PTYPE)
[...]
  0: (SB-INT:BUG "~@<failed AVER: ~2I~_~S~:>" (EQ (SB-C::TN-PRIMITIVE-TYPE SB-C::LOC) SB-C::FUNCTION-PTYPE))
  1: (SB-IMPL::%FAILED-AVER (EQ (SB-C::TN-PRIMITIVE-TYPE SB-C::LOC) SB-C::FUNCTION-PTYPE))
  2: (SB-C::FUN-LVAR-TN #<unused argument> #<unused argument> #<SB-C::LVAR 1 {100444A4E3}>)
  3: (SB-C::IR2-CONVERT-TAIL-FULL-CALL #<SB-C::COMBINATION :FUN #<SB-C::REF :%SOURCE-NAME SB-C::THING :LEAF #<SB-C::LAMBDA-VAR :%SOURCE-NAME F :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)> :WHE..
  4: (SB-C::IR2-CONVERT-FULL-CALL #<SB-C::COMBINATION :FUN #<SB-C::REF :%SOURCE-NAME SB-C::THING :LEAF #<SB-C::LAMBDA-VAR :%SOURCE-NAME F :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)> :WHERE-FR..
[...]

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

In e65eaf4af382569221c9fe86c59fd06ac0bd9595.

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
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.