From 3d1509c19d15f08a6bc6c8e5c24070222d758a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Le=20Barbier?= Date: Thu, 11 Apr 2024 11:06:48 +0200 Subject: [PATCH] Support obsolete REPORT clauses in DEFINE-ASSERTION --- src/assertion.lisp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/assertion.lisp b/src/assertion.lisp index 0fe4d65..c3320d3 100644 --- a/src/assertion.lisp +++ b/src/assertion.lisp @@ -34,6 +34,8 @@ and remaining FORMS as multiple values." (and (> (length forms) 1) (stringp (first forms)))) (report-p (forms) (and (eq :report (first forms)) (second forms))) + (list-report-p (forms) + (and (>= (length forms) 1) (listp (first forms)) (eq :report (first (first forms))))) (read-docstring (forms) (if (docstring-p forms) (read-report (first forms) (rest forms)) @@ -45,6 +47,10 @@ and remaining FORMS as multiple values." ((eq :report (first forms)) (error "The assertion definition ~A announces a :REPORT which is not provided." (symbol-name name))) + ((list-report-p forms) + (warn "Obsolete :REPORT clause in DEFINE-ASSERTION. +The :REPORT clause should not be enclosed in a list.") + (read-declarations docstring (second (first forms)) (rest forms))) (t (read-declarations docstring docstring forms)))) (read-declarations (docstring report forms)