unintern removes the wrong symbol
Bug #693796 reported by
Stas Boukarev
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).
description: | updated |
description: | updated |
tags: | added: review |
Changed in sbcl: | |
assignee: | nobody → Nikodemus Siivola (nikodemus) |
status: | New → In Progress |
tags: | removed: review |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.