The value NIL is not of type SB-C::LVAR (type-incorrect structure accessor)

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

Bug Description

(defstruct (foo (:type list))
  (x nil)
  (y 0))

(lambda (a)
  (setf (foo-x :b) nil ;; :b is type-incorrect here
        (foo-y a) 0))

===>

The value
  NIL
is not of type
  SB-C::LVAR
   [Condition of type TYPE-ERROR]
[...]
  0: (SB-C::LAMBDA-VAR-REF-LVAR #<SB-C::REF :%SOURCE-NAME STRUCTURE :LEAF #<SB-C::LAMBDA-VAR :%SOURCE-NAME STRUCTURE :TYPE #<SB-KERNEL:UNION-TYPE LIST> :WHERE-FROM :DECLARED {10064A9B93}> {10064AAA53}>)
  1: (SB-C::MAY-DELETE-MODIFYING-CAST #<SB-C::MODIFYING-CAST :%TYPE-CHECK T :VALUE #<SB-C::LVAR 1 {10064AA933}> :ASSERTED-TYPE #1=#<SB-KERNEL:UNION-TYPE SEQUENCE> :TYPE-TO-CHECK #1# {10064AAEA3}>)
  2: (SB-C::MAYBE-DELETE-CAST #<SB-C::MODIFYING-CAST :%TYPE-CHECK T :VALUE #<SB-C::LVAR 1 {10064AA933}> :ASSERTED-TYPE #1=#<SB-KERNEL:UNION-TYPE SEQUENCE> :TYPE-TO-CHECK #1# {10064AAEA3}>)
  3: (SB-C::IR1-OPTIMIZE-CAST #<SB-C::MODIFYING-CAST :%TYPE-CHECK T :VALUE #<SB-C::LVAR 1 {10064AA933}> :ASSERTED-TYPE #1=#<SB-KERNEL:UNION-TYPE SEQUENCE> :TYPE-TO-CHECK #1# {10064AAEA3}>)
 [...]

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

ea530717c76fe27ecee2c0d3433677fd4c46f957

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.