From: Alastair Bridgewater Date: Sun, 30 May 2010 00:40:34 +0000 (+0000) Subject: 1.0.39.2: Fix symbol-name-conflict resolution test from 1.0.39.1. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=46b1591074b5cf7611eeab0d1e4af7ee4e22ec94;p=sbcl.git 1.0.39.2: Fix symbol-name-conflict resolution test from 1.0.39.1. * 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. --- diff --git a/NEWS b/NEWS index 5bbc6b5..1a17085 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/src/code/target-package.lisp b/src/code/target-package.lisp index fddb492..0e0a0aa 100644 --- a/src/code/target-package.lisp +++ b/src/code/target-package.lisp @@ -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)) diff --git a/tests/packages.impure.lisp b/tests/packages.impure.lisp index 7e912ad..0d6e194 100644 --- a/tests/packages.impure.lisp +++ b/tests/packages.impure.lisp @@ -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")) diff --git a/version.lisp-expr b/version.lisp-expr index 8371a73..2fdd2ce 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"