COERCE should signal an error on several character coercions

Bug #841312 reported by Lutz Euler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

In SBCL 1.0.51.29-cd470a0, the expression

(mapcar 'type-of (list
    (coerce #\Nak 'standard-char)
    (coerce #\a 'extended-char)
    (coerce (code-char 955) 'base-char)
    (coerce 'a 'standard-char)
    (coerce "a" 'standard-char)))

evaluates to

(BASE-CHAR STANDARD-CHAR EXTENDED-CHAR STANDARD-CHAR STANDARD-CHAR)

I had expected it to throw an error instead as IMO all five
coercions are impossible according to CLHS entry COERCE.

I have a patch for this that I will attach as soon as
launchpad tells me the bug number (which I need
to name the test case).

Greetings,

Lutz

Tags: coerce review
Revision history for this message
Lutz Euler (lutz-euler) wrote :
tags: added: coerce review
Changed in sbcl:
assignee: nobody → Lutz Euler (lutz-euler)
Lutz Euler (lutz-euler)
Changed in sbcl:
status: New → Triaged
importance: Undecided → Low
Lutz Euler (lutz-euler)
Changed in sbcl:
status: Triaged → In Progress
Revision history for this message
Lutz Euler (lutz-euler) wrote :

I just committed a modified version of the patch from #1
(leaving out the part that made the test "BUG-657183" in
"tests/stream.impure.lisp" readable under non-unicode SBCL
and skipped it there, as something to that effect has been
committed in the meantime, and adding a NEWS entry).

Changed in sbcl:
status: In Progress → Fix Committed
assignee: Lutz Euler (lutz-euler) → nobody
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.