Skip to content

Commit

Permalink
Support obsolete REPORT clauses in DEFINE-ASSERTION
Browse files Browse the repository at this point in the history
  • Loading branch information
foretspaisibles committed Apr 11, 2024
1 parent e2ec886 commit 3d1509c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/assertion.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit 3d1509c

Please sign in to comment.