unintern removes the wrong symbol

Bug #693796 reported by Stas Boukarev on 2010-12-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

UNINTERN is specified to unintern a symbol if it's present in the package. Symbol can be present either by being interned or imported, but not inherited. And unitern accepts a symbol, not a symbol designator, but SBCL treats it as a designator.
(progn (defpackage :foo (:shadow :sym))
       (unintern :sym :foo)
       (find-symbol "SYM" :foo))

returns NIL, NIL.

Attached patch fixes this (with a test-case included).

Stas Boukarev (stassats) on 2010-12-23
description: updated
description: updated
Stas Boukarev (stassats) wrote :

After applying that patch one test fails, but that's because it calls (unintern symbol) twice, while interning it between the calls, but it can't unintern the second time because that would be a different symbol. I attached a new patch which corrects this test as well.

Stas Boukarev (stassats) on 2010-12-29
tags: added: review
Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: New → In Progress
tags: removed: review
Nikodemus Siivola (nikodemus) wrote :


Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
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