Skip to content

Commit

Permalink
1.0.39.2: Fix symbol-name-conflict resolution test from 1.0.39.1.
Browse files Browse the repository at this point in the history
  * Before signalling a name-conflict in IMPORT due to a symbol found
previously on the arglist, remove the earlier symbol from the list of
symbols to add to the package (one or the other will be shadowing-imported,
and there's no further check for name collision.
  • Loading branch information
Alastair Bridgewater committed May 30, 2010
1 parent e24fdd1 commit 46b1591
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
;;;; -*- coding: utf-8; fill-column: 78 -*-
changes relative to sbcl-1.0.39:
* bug fix: Name conflicts between symbols passed as arguments to a
single call to IMPORT no longer add multiple symbols with the same name
to the package (detectable via DO-SYMBOLS).

changes in sbcl-1.0.39 relative to sbcl-1.0.38:
* bug fix: Backtrace from undefined function on x86 and x86-64 now show
the calling frame.
Expand Down
1 change: 1 addition & 0 deletions src/code/target-package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,7 @@ the importation, then a correctable error is signalled."
(let ((found (member sym syms :test #'string=)))
(if found
(when (not (eq (car found) sym))
(setf syms (remove (car found) syms))
(name-conflict package 'import sym sym (car found)))
(push sym syms))))
((not (eq s sym))
Expand Down
2 changes: 1 addition & 1 deletion tests/packages.impure.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ if a restart was invoked."
;;; Make sure that resolving a name-conflict in IMPORT doesn't leave
;;; multiple symbols of the same name in the package (this particular
;;; scenario found in 1.0.38.9, but clearly a longstanding issue).
(with-test (:name import-conflict-resolution :fails-on :sbcl)
(with-test (:name import-conflict-resolution)
(with-packages (("FOO" (:export "NIL"))
("BAR" (:use)))
(with-name-conflict-resolution ((sym "FOO" "NIL"))
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"1.0.39.1"
"1.0.39.2"

0 comments on commit 46b1591

Please sign in to comment.