deftransform error on LENGTH and MAKE--SEQUENCE of (STRING *)

Bug #1888919 reported by Paul F. Dietz on 2020-07-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

;; Note that this is valid code!

(compile nil '(lambda () (length (make-sequence '(string *) 10 :initial-element #\a))))

==>

The value
  *
is not of type
  LIST
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {101675CC43}>)

Backtrace:
  0: ((SB-C:DEFTRANSFORM SB-C::VECTOR-LENGTH) #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME SB-C::VECTOR-LENGTH :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM..
  1: (SB-C::IR1-OPTIMIZE-COMBINATION #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME SB-C::VECTOR-LENGTH :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARE..
  2: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME (LAMBDA NIL) :REANALYZE T {1016E84773}> NIL)
  3: (SB-C::IR1-OPTIMIZE-UNTIL-DONE #<SB-C:COMPONENT :NAME (LAMBDA NIL) :REANALYZE T {1016E84773}>)
  4: (SB-C::IR1-OPTIMIZE-PHASE-1 #<SB-C:COMPONENT :NAME (LAMBDA NIL) :REANALYZE T {1016E84773}>)
  5: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME (LAMBDA NIL) :REANALYZE T {1016E84773}>)
  6: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (LAMBDA NIL) :REANALYZE T {1016E84773}>)
  7: (SB-C::%COMPILE (LAMBDA NIL (LENGTH (MAKE-SEQUENCE # 10 :INITIAL-ELEMENT #\a))) #<SB-C::CORE-OBJECT {1016E810F3}> :NAME NIL :PATH (SB-C::ORIGINAL-SOURCE-START 0 0))

Stas Boukarev (stassats) on 2020-08-01
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