X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fpackage-locks.impure.lisp;h=3ba97a1eea27046401f5c86f3369986612e768b5;hb=ee5629ee974ee8ce7a1cb245a99e94f8943ffd90;hp=5a95e186be7f5ff3569bfff8d8baceaa19290e54;hpb=5fa4a761bfbc8fd2016fd63725c98e8e29e6d5b8;p=sbcl.git diff --git a/tests/package-locks.impure.lisp b/tests/package-locks.impure.lisp index 5a95e18..3ba97a1 100644 --- a/tests/package-locks.impure.lisp +++ b/tests/package-locks.impure.lisp @@ -535,4 +535,19 @@ (setf (macro-function 'to-die-for) (constantly :replacement2)))))) (assert (eq :original (macroexpand '(macro-killing-macro-1:to-die-for))))) +(with-test (:name :compile-time-defun-package-locked) + ;; Make sure compile-time side-effects of DEFUN are protected against. + (let ((inline-lambda (function-lambda-expression #'fill-pointer))) + ;; Make sure it's actually inlined... + (assert inline-lambda) + (assert (eq :ok + (handler-case + (ctu:file-compile `((defun fill-pointer (x) x))) + (sb-ext:symbol-package-locked-error (e) + (when (eq 'fill-pointer + (sb-ext:package-locked-error-symbol e)) + :ok))))) + (assert (equal inline-lambda + (function-lambda-expression #'fill-pointer))))) + ;;; WOOT! Done.