unintern removes the wrong symbol

Bug #693796 reported by Stas Boukarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

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.
So,
(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)
description: updated
description: updated
Revision history for this message
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)
tags: added: review
Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: New → In Progress
tags: removed: review
Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

In 1.0.45.26.

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.