sbcl.sbcl/tests/package-test-5.lisp
Charles Zhang 5fdf84566e Fix some remainng package weirdness.
Get rid of deferred packages and so on. This makes two tests fail
under block compilation mode, but fixes a very real correctness
problem in normal evaluation mode. A serious rethink needs to be done
to figure out how to deal with fasloader and package interaction under
block compilation. At least we solved the accessibility issue
correctly with the use of a new loader op. Now the package mechanisms
are back to what they looked like before the implementation of
deferred packages and should be at least as correct as the state of
affairs before that was added.

Fixes lp#2000004.
2022-12-20 02:04:45 +01:00

19 lines
555 B
Common Lisp

(defun foo.delete-package-redefpackage ()
(let ((package (find-package :bar-drrfl)))
(when package
(let ((count 0))
(do-symbols (sym package)
(incf count))
(assert (= count 2))
(delete-package package))))
(make-package "BAR-DRRFL" :use ())
(let ((package (find-package :bar-drrfl))
(count 0))
(do-symbols (sym package)
(incf count))
(assert (= count 0))
(eval (read-from-string
"(progn
(defun bar-drrfl::a ())
(defun bar-drrfl::b ()))"))))