Fix 14 wave-4 re-review findings (batches w4a+w4b)
This commit is contained in:
1 parent
a28a35991f
commit
fd5e11cdeb
23 files changed
+98
-29
No files matched your search
@@ -2,10 +2,12 @@
|
||||
;;;
|
||||
;;; A single colon reaches only EXPORTED symbols. The double colon
|
||||
;;; shop::secret-sale reaches the internal ones too. :NICKNAMES
|
||||
;;; gives a package extra names to call it by. And :SHADOW keeps a
|
||||
;;; name a package USEs from colliding with your own - without it,
|
||||
;;; defining FILL below would quietly redefine COMMON-LISP's FILL
|
||||
;;; for everyone.
|
||||
;;; gives a package extra names to call it by. And :SHADOW claims a
|
||||
;;; name a USEd package would otherwise lend you: FILL below means
|
||||
;;; POST-OFFICE's own symbol, the claim spelled out in the
|
||||
;;; defpackage. Without it, plain FILL inside POST-OFFICE reads as
|
||||
;;; COMMON-LISP's own - the DEFUN below would redefine that for
|
||||
;;; everyone, and SBCL's package lock refuses, with an error.
|
||||
|
||||
(defpackage #:shop
|
||||
(:use #:common-lisp)
|
||||
@@ -27,8 +29,9 @@
|
||||
(shop:price))
|
||||
|
||||
;; TODO: The defpackage below is missing its (:shadow #:fill).
|
||||
;; Add it, or DEFUN FILL under POST-OFFICE redefines COMMON-LISP's
|
||||
;; FILL for everyone.
|
||||
;; Add it, so POST-OFFICE claims FILL up front - without the claim
|
||||
;; the DEFUN below would redefine COMMON-LISP's own FILL, and
|
||||
;; SBCL's package lock refuses to load the file at all.
|
||||
(defpackage #:post-office
|
||||
(:use #:common-lisp))
|
||||
|
||||
@@ -49,3 +52,5 @@
|
||||
(check-equal (list 0 0 0) (fill (list 1 2 3) 0))
|
||||
(check-equal '(post-office::stuffed crate)
|
||||
(funcall (find-symbol "FILL" '#:post-office) 'crate))
|
||||
(check (member "FILL" (package-shadowing-symbols '#:post-office)
|
||||
:test #'string= :key #'symbol-name))
|
||||
Reference in new issue
Block a user