Skip to content

Commit

Permalink
macros: Return the value when it's there.
Browse files Browse the repository at this point in the history
Otherwise NIL value can cause mismatch error.

Returning T is not an option either, because then it won't return the
proper value of the index.
  • Loading branch information
aartaka committed Sep 15, 2023
1 parent da2a07e commit cb40f56
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions macros.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ If TEST is `jtruep' evaluate BODY."
(let ((result (jget indices object)))
(or (typecase expected
((eql t) (handler-case
(prog1
t
(jget* indices object))
(return-from 'check-value (jget* indices object))
(error () nil)))
((eql :true) (eq t result))
((eql :false) (eq nil result))
Expand Down

0 comments on commit cb40f56

Please sign in to comment.