1.0.39.1: Test case for symbol-conflict resolution bug on import.
authorAlastair Bridgewater <lisphacker@users.sourceforge.net>
Sun, 30 May 2010 00:32:11 +0000 (00:32 +0000)
committerAlastair Bridgewater <lisphacker@users.sourceforge.net>
Sun, 30 May 2010 00:32:11 +0000 (00:32 +0000)
  * If two symbols of the same name are IMPORTed to a package that does
not yet have a symbol of that name accessible, and the latter of the two
symbols is chosen during conflict resolution, the former is also added
to the package, as is detectable via do-symbols.

tests/packages.impure.lisp
version.lisp-expr

index b2421b2..7e912ad 100644 (file)
@@ -245,6 +245,17 @@ if a restart was invoked."
       (is (eql 1 (length conflict-sets)))
       (is (eql 3 (length (first conflict-sets)))))))
 
+;;; 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-packages (("FOO" (:export "NIL"))
+                  ("BAR" (:use)))
+    (with-name-conflict-resolution ((sym "FOO" "NIL"))
+      (import (list 'CL:NIL (sym "FOO" "NIL")) "BAR"))
+    (do-symbols (sym "BAR")
+      (assert (eq sym (sym "FOO" "NIL"))))))
+
 ;;; UNINTERN
 (with-test (:name unintern.1)
   (with-packages (("FOO" (:export "SYM"))
index e73ea3b..8371a73 100644 (file)
@@ -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.0.39.1"