Type mismatch in the expansion of (setf schar)

Bug #1668619 reported by Timofei Shatrov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Medium
Unassigned

Bug Description

Minimal example:

(defun weird-warning (str)
  (let ((copy (copy-seq str)))
    (setf (char copy 0) #\HIRAGANA_LETTER_SMALL_TU)))

Upon compiling the following warning appears:

  warning:
    Derived type of SB-C::NEW-VALUE is
      (VALUES EXTENDED-CHAR &OPTIONAL),
    conflicting with its asserted type
      BASE-CHAR.

This does not happen in SBCL 1.3.3 but does happen in SBCL 1.3.8 and later.

The code works, but the warning trips SLIME per-function compilation and asdf:load-system.

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

This is actually
(defun foo (a)
  (setf (schar a 0) #\HIRAGANA_LETTER_SMALL_TU))

summary: - warning when trying to modify a string copied by COPY-SEQ with Unicode
- character
+ Type mismatch in the expansion of (setf schar)
Changed in sbcl:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Stas Boukarev (stassats) wrote :

In 1ac88e72db13e6586b8ceebff468b1fa108178cb

Changed in sbcl:
status: Triaged → Fix Committed
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.