Skip to content
Snippets Groups Projects
Commit d31bd2e6 authored by pfdietz's avatar pfdietz
Browse files

Define the declaration/type conflict tests only if the system actually...

Define the declaration/type conflict tests only if the system actually warnings on bogus declarations
parent d9e4c9d6
No related branches found
Tags 2.124
No related merge requests found
...@@ -27,6 +27,12 @@ ...@@ -27,6 +27,12 @@
;;; structure, condition, or type, when the symbol has been ;;; structure, condition, or type, when the symbol has been
;;; declared as a declaration name, or vice versa, signals an error." ;;; declared as a declaration name, or vice versa, signals an error."
;;; Declare these only if bad declarations produce warnings.
(when (block done
(handler-bind ((warning #'(lambda (c) (return-from done t))))
(eval `(let () (declare (,(gensym))) nil))))
(deftest declaration.4 (deftest declaration.4
(let ((sym (gensym))) (let ((sym (gensym)))
(proclaim `(declaration ,sym)) (proclaim `(declaration ,sym))
...@@ -54,7 +60,7 @@ ...@@ -54,7 +60,7 @@
(deftest declaration.8 (deftest declaration.8
(let ((sym (gensym))) (let ((sym (gensym)))
(eval `(deftype ,sym () error)) (eval `(deftype ,sym () 'error))
(eval `(signals-error-always (proclaim '(declaration ,sym)) (eval `(signals-error-always (proclaim '(declaration ,sym))
error))) error)))
t t) t t)
...@@ -80,6 +86,8 @@ ...@@ -80,6 +86,8 @@
error))) error)))
t t) t t)
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment