Bizarre error compiling typep with malformed type inside a nested lambda

Bug #1741512 reported by Paul F. Dietz on 2018-01-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

 (lambda () (lambda (v) (typep v '(unsigned-byte 8 x (error ~s v)))))

===>

error in FORMAT: No more arguments
  error while parsing arguments to DEFTYPE UNSIGNED-BYTE:
  too many elements in
    (8 X (ERROR ~S V))
  to satisfy lambda list
    (&OPTIONAL SB-KERNEL::S):
  between 0 and 1 expected, but got 3
                                                                                                  ^
   [Condition of type SB-FORMAT:FORMAT-ERROR]

Restarts:
 0: [MUFFLE-WARNING] Skip warning.
 1: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: ((FLET SB-KERNEL::%WARN :IN "SYS:SRC;CODE;WARM-ERROR.LISP") "error while parsing arguments to DEFTYPE UNSIGNED-BYTE: ..)
  1: (SB-C:COMPILER-WARN "error while parsing arguments to DEFTYPE UNSIGNED-BYTE: ..)
  2: (SB-C::MAY-DELETE-CAST-WITH-HOOK #<SB-C::CAST-WITH-HOOK :%TYPE-CHECK T :VALUE #<SB-C::LVAR 1 {1007A2E8B3}> :ASSERTED-TYPE #1=#<SB-KERNEL:UNION-TYPE (OR CONS SYMBOL SB-KERNEL:CLASSOID CLASS)> :TYPE-TO-..
  3: (SB-C::MAYBE-DELETE-CAST #<SB-C::CAST-WITH-HOOK :%TYPE-CHECK T :VALUE #<SB-C::LVAR 1 {1007A2E8B3}> :ASSERTED-TYPE #1=#<SB-KERNEL:UNION-TYPE (OR CONS SYMBOL SB-KERNEL:CLASSOID CLASS)> :TYPE-TO-CHECK #1..
  4: (SB-C::IR1-OPTIMIZE-CAST #<SB-C::CAST-WITH-HOOK :%TYPE-CHECK T :VALUE #<SB-C::LVAR 1 {1007A2E8B3}> :ASSERTED-TYPE #1=#<SB-KERNEL:UNION-TYPE (OR CONS SYMBOL SB-KERNEL:CLASSOID CLASS)> :TYPE-TO-CHECK #1..

Stas Boukarev (stassats) wrote :

3525b2735f7c7aa7b41d9d33ebbb3f6a7a5b0a41

Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats) on 2018-01-31
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers