The function SB-C::%STRUCTURE-IS-A is undefined.

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

Bug Description

(in-package :cl-user)

(defstruct bug024 x)

(let ((s (make-bug024 :x 17)))
  (eval
   `(defun foo (a)
      (declare (OPTIMIZE (SPEED 3) (SAFETY 1) (DEBUG 1) (SPACE 1)))
      (declare (type (member #:a #\x ,s) a))
      (bug024-x a)))
  (format t "~a~%" (foo s)))

==>

The function SB-C::%STRUCTURE-IS-A is undefined.
   [Condition of type UNDEFINED-FUNCTION]
[...]
Backtrace:
  0: ("undefined function" #<SB-KERNEL:LAYOUT (ID=1225) for COMMON-LISP-USER::BUG024 {50417483}> #<SB-KERNEL:LAYOUT (ID=1225) for COMMON-LISP-USER::BUG024 {50417483}>)
  1: (COMMON-LISP-USER::FOO #S(COMMON-LISP-USER::BUG024 :X 17))

Stas Boukarev (stassats)
Changed in sbcl:
assignee: nobody → Douglas Katzman (dougk)
Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Also:

(let ((s (make-bug024 :x 14)))
           (compile nil
                    `(lambda (a)
                       (when (typep a '(member #\8 ,s))
                         (bug024-x a)))))

==>

; in: LAMBDA (A)
; (BUG024-X A)
;
; caught STYLE-WARNING:
; Lisp error during constant folding:
; The function SB-C::%STRUCTURE-IS-A is undefined.
;
; compilation unit finished
; caught 1 STYLE-WARNING condition
#<FUNCTION (LAMBDA (A)) {52DBD37B}>
T
NIL

Douglas Katzman (dougk)
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.