Steel Bank Common Lisp

COERCE should signal an error on several character coercions

Reported by Lutz Euler on 2011-09-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
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

Lutz Euler (lutz-euler) wrote :
tags: added: coerce review
Changed in sbcl:
assignee: nobody → Lutz Euler (lutz-euler)
Lutz Euler (lutz-euler) on 2011-12-08
Changed in sbcl:
status: New → Triaged
importance: Undecided → Low
Lutz Euler (lutz-euler) on 2011-12-09
Changed in sbcl:
status: Triaged → In Progress
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  Edit
Everyone can see this information.

Other bug subscribers